Main mechanic done

This commit is contained in:
Ader Alisma 01 2025-07-13 18:13:05 -04:00
parent 921449fc1d
commit eef09242a8
4 changed files with 1453 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 2def22091e1ff0d43abe2797c18a2fda
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,27 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Creeper : Opponent
{
[SerializeField]
private GameObject creeplings;
[SerializeField]
private int creeplingsCount = 3;
public override void Death()
{
for (int i = 0; i < creeplingsCount; i++)
{
SpawnCreeplings();
}
base.Death();
}
private void SpawnCreeplings()
{
float randomX = Random.Range(0f, 2f) + transform.position.x;
Vector3 spawnPosition = new Vector3(randomX, transform.position.y, transform.position.z);
GameObject creeplingsInstance = Instantiate(creeplings, spawnPosition, Quaternion.identity);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f89e6964a347fce48a22f42c1c23416c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: