public override void Start() { base.Start(); sprite = transform.GetChild(0); gravity = 50f; direction.x = transform.parent.transform.rotation.y == 0 ? 1 : -1; direction.y = -1; //velocity.y = 20; //speed = 20; boxCollider = GetComponent <BoxCollider2D>(); playerMask = 1 << 8; bombRadius = 0.2f; poisonBombDamage = 10f; poisonBombSpawner = transform.parent.transform.parent.GetComponent <PoisonBombSpawner>(); }
protected override void Start() { base.Start(); transform.position = new Vector3(transform.position.x, transform.position.y, Random.Range(0.0f, 1.0f)); daggerSpawner = daggerSpawnerObject.GetComponent <DaggerSpawner>(); daggerSpawnPosition = new Vector3(0.8f, -0.3f, Random.Range(0.0f, 1.0f)); poisonBombSpawner = poisonBombSpawnerObject.GetComponent <PoisonBombSpawner>(); poisonBombSpawnPosition = new Vector3(0.8f, -0.3f, Random.Range(0.0f, 1.0f)); siegeMode = true; shielderMode = false; waitTime = new WaitForSeconds(coroutineCycle); StartCoroutine(Fsm()); playerMask = 1 << 8; }