//! --------life cycles-------- void Awake() { _rigidbody2d = GetComponent <Rigidbody2D>(); _core = GetComponent <PlayerCore>(); _missileController = GetComponent <PlayerMissileController>(); _mover = GetComponent <PlayerMover>(); _fireController = GetComponent <PlayerFireController>(); }
public override void Initialize() { _hp = _maxHP; _fallenProc = Collisions.CollisionBus.Subscribe(TagName.Ball, TagName.LaserFence, (ball, fence, collision) => { ApplyDamage(_fallenDamage); }); logger.Log("Initialized from :{0}", StackInfos.GetCallerTrace(2)); _instance = FindObjectOfType <PlayerCore>(); }