示例#1
0
        protected virtual void Awake()
        {
            Entity = GetComponent <Entity>();

            Input = Dependancy.Get <PlayerInput>(gameObject);

            Navigator = Dependancy.Get <PlayerNavigator>(gameObject);

            weapon.Init(Entity);
        }
示例#2
0
        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));
        }