public ClimbingState(PlayerMotor physicsController, PlayerController playerController, AnimationsController animationsController)
 {
     _playerTransform      = PlayerController.PlayerTransform;
     _physicsController    = physicsController;
     _playerController     = playerController;
     _animationsController = animationsController;
 }
 private void Start()
 {
     myPlayerAnimatorAndRotation = GetComponent <PlayerMovement>();
     myMovements = GetComponent <AnimationsController>();
     myStatus    = GetComponent <Status>();
     rotation    = GetComponent <Rigidbody>();
 }
示例#3
0
 public EnemyClimbAction(EnemyMotor enemyMotor, EnemyBehaviour enemyBehaviour, AnimationsController animationsController)
 {
     _animationsController = animationsController;
     _enemyMotor           = enemyMotor;
     _enemyBehaviour       = enemyBehaviour;
     _transform            = _enemyBehaviour.transform;
 }
示例#4
0
 private void SetInitialReferences()
 {
     SetGuidStarsAndPoints();
     GuideController = this.GetComponent <GuideControllerScript>();
     manager         = this.GetComponent <GameManager>();
     animations      = this.GetComponent <AnimationsController>();
 }
示例#5
0
 private void Start()
 {
     anim       = GetComponent <AnimationsController>();
     animator   = GetComponent <Animator>();
     controller = GetComponent <CharacterController>();
     bones      = GetComponent <BonesController>();
 }
示例#6
0
 public NormalState(PlayerMotor playerMotor, PlayerController playerController, AnimationsController animationsController)
 {
     _playerTransform      = PlayerController.PlayerTransform;
     _playerMotor          = playerMotor;
     _playerController     = playerController;
     _animationsController = animationsController;
     _triggers             = _playerController.Triggers;
 }
    public DeadState(PlayerMotor physicsController, PlayerController playerController, AnimationsController animationsController)
    {
        _physicsController    = physicsController;
        _playerController     = playerController;
        _animationsController = animationsController;

        _waitForRespawn = new WaitForSeconds(_respawnTime);
    }
 private void SetInitialReferences()
 {
     manager                   = this.GetComponent <GameManager>();
     animations                = this.GetComponent <AnimationsController>();
     GuideController           = GameObject.FindObjectOfType <GuideControllerScript>();
     audioSource               = this.GetComponent <AudioSource>();
     MusicManager.musicManager = GameObject.FindObjectOfType <MusicManager>();
 }
示例#9
0
    //Score
    ///UIController scoreTextDisplay;

    public void Init(GameObject enemyGameObject, string objectName)
    {
        name                 = objectName;
        escapePositions      = GameObject.FindGameObjectsWithTag(name);
        targetPosition       = GameObject.FindObjectOfType <AvatarController>().transform;
        animation_Controller = enemyGameObject.GetComponent <AnimationsController>();
        selectedEscapeRoute  = GetEscapePosition;
    }
示例#10
0
 void Start()
 {
     rb             = GetComponent <Rigidbody>();
     player         = GameObject.FindObjectOfType <PlayerFactory>();
     anim           = GetComponentInChildren <AnimationsController>();
     gameOverScreen = GameObject.Find("GameOverScreen");
     gameOverScreen.SetActive(false);
 }
示例#11
0
    public PlayerStateManager(PlayerMotor playerMotor, PlayerController playerController, AnimationsController animationsController)
    {
        _playerMotor          = playerMotor;
        _playerController     = playerController;
        _animationsController = animationsController;

        CreateStates();
    }
示例#12
0
    public EnemyMovementActionManager(EnemyBehaviour enemyBehaviour, EnemyMotor enemyMotor, AnimationsController animationsController)
    {
        _enemyBehaviour       = enemyBehaviour;
        _enemyMotor           = enemyMotor;
        _animationsController = animationsController;

        CreateActions();
    }
示例#13
0
 private void SetInitialReferences()
 {
     failureSound          = Resources.Load <AudioClip>("Speak_Failure");
     manager               = this.GetComponent <GameManager>();
     GuideControllerScript = this.GetComponent <GuideControllerScript>();
     animations            = this.GetComponent <AnimationsController>();
     listening             = this.GetComponent <ListeningSequence>();
     writing               = this.GetComponent <WritingSequence>();
 }
    public PushingState(PlayerMotor physicsController, PlayerController playerController, AnimationsController animationsController)
    {
        _playerTransform      = PlayerController.PlayerTransform;
        _physicsController    = physicsController;
        _playerController     = playerController;
        _animationsController = animationsController;

        _triggers = _playerController.Triggers;
    }
示例#15
0
 private void Start()
 {
     timeNextGen    = timeUpgradeDistanceZombiesFollowPlayer;
     Jogador        = GameObject.FindWithTag(Tags.Player);
     controlJogador = Jogador.GetComponent <PlayerController>();
     myMovements    = GetComponent <SpriteMovements>();
     myAnimator     = GetComponent <AnimationsController>();
     ZombieRandomizer();
     myStatus        = GetComponent <Status>();
     scrUIController = GameObject.FindObjectOfType(typeof(UIController)) as UIController;
 }
示例#16
0
    public TurretState(PlayerMotor physicsController, PlayerController playerController, AnimationsController animationsController)
    {
        _playerTransform      = PlayerController.PlayerTransform;
        _physicsController    = physicsController;
        _playerController     = playerController;
        _animationsController = animationsController;

        _cameraController = _playerController.cameraController;
        _crossHair        = _playerController.CrossHair;
        _bulletLayerMask  = _playerController.BulletLayerMask;
    }
示例#17
0
    // Start is called before the first frame update


    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }
        else
        {
            Destroy(this.gameObject);
            return;
        }
    }
示例#18
0
 private void Start()
 {
     player               = GameObject.FindWithTag("Player").transform;
     agent                = GetComponent <NavMeshAgent>();
     bossStatus           = GetComponent <Status>();
     agent.speed          = bossStatus.Velocity;
     bossAnimation        = GetComponent <AnimationsController>();
     bossMovement         = GetComponent <SpriteMovements>();
     ScrUIController      = GameObject.FindObjectOfType(typeof(UIController)) as UIController;
     BossLifeBar.maxValue = bossStatus.InitialLife;
     SliderLifeUpdate();
 }
示例#19
0
    private void SingletonPattern()
    {
        if (Instance == null)
        {
            Instance = this;
        }

        else if (Instance != this)
        {
            Destroy(gameObject);
        }
    }
示例#20
0
 public GunState(PlayerMotor physicsController, PlayerController playerController, AnimationsController animationsController)
 {
     _playerTransform      = PlayerController.PlayerTransform;
     _playerMotor          = physicsController;
     _playerController     = playerController;
     _animationsController = animationsController;
     _animationsController.FallFlatBehaviour.PlayerGunHolder = this;
     _triggers         = _playerController.Triggers;
     _cameraController = _playerController.cameraController;
     _holsterGun1Hand  = _playerController.HolsterGun1Hand;
     _holsterGun2Hands = _playerController.HolsterGun2Hands;
     _crossHair        = _playerController.CrossHair;
     _bulletLayerMask  = _playerController.BulletLayerMask;
 }
示例#21
0
    private void Start()                      // NEW
    {
        FightOn               = false;
        attackArea            = GetComponentInChildren <TriggerAttackArea>();
        characterPivotPoint   = GameObject.Find("Pivot");
        characterTransform    = GetComponent <Transform>();
        animations_Controller = GetComponentInChildren <AnimationsController>();
        AnimatorInfo          = GetComponentInChildren <Animator>();

        #region Boss
        //#Boss// battle need to manage State in game manager
        //if (GameLevelManager.GetSceneName() == "boss")
        //{
        //    BossScene = true;
        //    PreviousIndex = 0;
        //}
        //else
        //{
        //    BossScene = false;
        //}
        #endregion
    }
示例#22
0
 public Action(Rat rat)
 {
     this.rat             = rat;
     ratController        = rat.GetComponent <RatController>();
     animationsController = rat.GetComponent <AnimationsController>();
 }
 private void SetInitialReferences()
 {
     manager    = this.GetComponent <GameManager>();
     animations = this.GetComponent <AnimationsController>();
 }
示例#24
0
 public void OnDestroy()
 {
     instance = null;
 }
示例#25
0
 public void Awake()
 {
     instance = this;
 }
示例#26
0
 public void SetBehaviour(PlayerController playerController, PlayerMotor playerMotor, AnimationsController animationsController)
 {
     _playerController     = playerController;
     _playerMotor          = playerMotor;
     _animationsController = animationsController;
 }
示例#27
0
 public void SetBehaviour(EnemyBehaviour enemyBehaviour, EnemyMotor enemyMotor, AnimationsController animationsController)
 {
     _enemyBehaviour       = enemyBehaviour;
     _enemyMotor           = enemyMotor;
     _animationsController = animationsController;
 }