Beispiel #1
0
 // Use this for initialization
 void Start()
 {
     player_move  = Player.GetComponent <PlayerMove>();
     PS           = Player.GetComponent <PlayerStatement>();
     SC           = GetComponent <ShotContoroller>();
     BulletSounds = Sounds.GetComponents <AudioSource>();
 }
Beispiel #2
0
 private void Awake()
 {
     portalIn         = GameObject.FindGameObjectWithTag("PortalIn");
     portalOut        = GameObject.FindGameObjectWithTag("PortalOut");
     start            = GameObject.FindGameObjectWithTag("StartPoint");
     playerDyingCheck = GetComponent <PlayerStatement>();
     animator         = GetComponent <Animator>();
 }
Beispiel #3
0
 private void Start()
 {
     HuntLevelData.CoinChessCount = 0;
     HuntLevelData.CoinCount      = 0;
     HuntLevelData.ResourceCount  = 0;
     player = FindObjectOfType <PlayerStatement>();
     spawn  = FindObjectOfType <PlayerMovement>();
 }
Beispiel #4
0
 private void Awake()
 {
     enemy_Rigidbody = gameObject.GetComponent <Rigidbody2D>();
     enemy_Animator  = gameObject.GetComponent <Animator>();
     character       = GameObject.FindGameObjectWithTag("Character");
     thePLayer       = character.GetComponent <PlayerStatement>();
     finish          = FindObjectOfType <FinishPoint>();
 }
Beispiel #5
0
 private void Start()
 {
     m_Stats    = FindObjectOfType <PlayerStats>();
     m_Player   = FindObjectOfType <PlayerStatement>();
     m_Respawns = FindObjectOfType <ItemRespawn>();
     playerUI   = FindObjectOfType <PlayerItemsCount>();
     finish     = FindObjectOfType <FinishPoint>();
     alert      = FindObjectOfType <Alert>();
 }
Beispiel #6
0
    void CookieEvent(GameObject enemy, float per)
    {
        PlayerStatement EnemyPS   = enemy.GetComponent <PlayerStatement>();
        int             CookieNum = 0;

        CookieNum          = (int)(PS.CookieNum * per);
        EnemyPS.CookieNum += CookieNum;
        GM.AddPlayerCookieNum(enemy.tag, CookieNum);
        PS.CookieNum -= CookieNum;
        GM.AddPlayerCookieNum(tag, -CookieNum);
    }
Beispiel #7
0
 // Use this for initialization
 void Start()
 {
     PM        = Player.GetComponent <PlayerMove>();
     PS        = Player.GetComponent <PlayerStatement>();
     SB        = PM.builder.GetComponent <StageBuild>();
     baseSpeed = PM.speed;
     counter   = 0;
     AudioSource[] AS = SoundManager.GetComponents <AudioSource>();
     S_GetItem = AS[0];
     S_OnHit   = AS[1];
 }
Beispiel #8
0
    void Update()
    {
        if (!isLocalPlayer)
        {
            return;
        }

        if (Input.GetKeyDown(KeyCode.A))
        {
            MyState = PlayerStatement.attack;
        }
        if (Input.GetKeyDown(KeyCode.D))
        {
            MyState = PlayerStatement.defend;
        }

        switch (MyState)
        {
        case PlayerStatement.attack: break;

        case PlayerStatement.defend: break;
        }
    }
Beispiel #9
0
 private void Start()
 {
     player = FindObjectOfType <PlayerStatement>();
 }
Beispiel #10
0
 void Start()
 {
     enemies = FindObjectsOfType <Enemy>();
     player  = FindObjectOfType <PlayerStatement>();
 }