public void ReceiveItem(PlayerController player) { if (open) { return; } open = true; animator.SetBool("Open", true); Instantiate(contains, transform.position, Quaternion.identity); }
// Use this for initialization private void Start() { spawn = GameObject.FindGameObjectWithTag("Respawn").transform; enemyList = FindObjectsOfType<AbstractMovable>().ToList(); // GameObject playerObject = (GameObject) Instantiate(player, spawn.position, Quaternion.identity); playerController = FindObjectOfType<PlayerController>(); print(enemyList.Count); for (int i = 0; i < 40; i++) { for (int j = 0; j < 40; j++) { Instantiate(fogOfWar, new Vector3(i*16, j*16, 0), Quaternion.identity); } } }
//method to broadcast to the controller to all components protected void AssignController(PlayerController _controller) { this._controller = _controller; }
public GroundedDownwardAttackState(PlayerController playerController, PlayerInput playerInput, PlayerData playerData, string animation) : base(playerController, playerInput, playerData, animation) { pData.AnimationLength.TryGetValue(animation, out animationLength); sound = Resources.Load <AudioClip>(@"Sounds/mage_knight_sword"); }