Exemple #1
0
        private void Start()
        {
            _transform   = transform;
            movementType = MovementType.air;
            soundHandler = GameManager.Instance.soundHandler;

            currentRotateSpeed = rotateSpeed;
            coords.direction   = Coordinates.ConvertWorldToVector2(transform.forward);

            activeEquipement.Init(this);
        }
        private void Start()
        {
            environment  = GameManager.Instance.levelManager.environnement;
            soundHandler = GameManager.Instance.soundHandler;

            movementType = MovementType.sea;
            _transform   = transform;

            coords = new Coordinates(_transform.position, Vector2.up, 0);

            coords.direction = Coordinates.ConvertWorldToVector2(_transform.forward);

            //Equipment initialization.
            passiveEquipement.Init(this);
            activeEquipement.Init(this);
        }
        void Start()
        {
            movementType = MovementType.air;
            _transform   = transform;

            coords.position    = Coordinates.ConvertWorldToVector2(_transform.position);
            coords.direction   = Coordinates.ConvertWorldToVector2(transform.forward);
            currentTargetPoint = coords.position + Coordinates.ConvertWorldToVector2(_transform.forward * 2);

            environment     = GameManager.Instance.levelManager.environnement;
            soundHandler    = GameManager.Instance.soundHandler;
            defaultMaxSpeed = speed;
            //Equipment initialization.
            passiveEquipement.Init(this);
            activeEquipement.Init(this);

            soundHandler.PlaySound(movementSound, audioSource, targetGroup);
        }