protected virtual void Awake() { Entity = GetComponent <Entity>(); Input = Dependancy.Get <PlayerInput>(gameObject); Navigator = Dependancy.Get <PlayerNavigator>(gameObject); weapon.Init(Entity); }
protected virtual void ProcessWeapons() { var angle = Mathf.Abs(Mathf.DeltaAngle(transform.eulerAngles.y, PlayerNavigator.VectorToAngle(Input.Direction))); weapon.Process(Input.Shoot && (!Application.isMobilePlatform || angle < 10f)); }