// Use this for initialization void Start() { player_move = Player.GetComponent <PlayerMove>(); PS = Player.GetComponent <PlayerStatement>(); SC = GetComponent <ShotContoroller>(); BulletSounds = Sounds.GetComponents <AudioSource>(); }
private void Awake() { portalIn = GameObject.FindGameObjectWithTag("PortalIn"); portalOut = GameObject.FindGameObjectWithTag("PortalOut"); start = GameObject.FindGameObjectWithTag("StartPoint"); playerDyingCheck = GetComponent <PlayerStatement>(); animator = GetComponent <Animator>(); }
private void Start() { HuntLevelData.CoinChessCount = 0; HuntLevelData.CoinCount = 0; HuntLevelData.ResourceCount = 0; player = FindObjectOfType <PlayerStatement>(); spawn = FindObjectOfType <PlayerMovement>(); }
private void Awake() { enemy_Rigidbody = gameObject.GetComponent <Rigidbody2D>(); enemy_Animator = gameObject.GetComponent <Animator>(); character = GameObject.FindGameObjectWithTag("Character"); thePLayer = character.GetComponent <PlayerStatement>(); finish = FindObjectOfType <FinishPoint>(); }
private void Start() { m_Stats = FindObjectOfType <PlayerStats>(); m_Player = FindObjectOfType <PlayerStatement>(); m_Respawns = FindObjectOfType <ItemRespawn>(); playerUI = FindObjectOfType <PlayerItemsCount>(); finish = FindObjectOfType <FinishPoint>(); alert = FindObjectOfType <Alert>(); }
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); }
// 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]; }
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; } }
private void Start() { player = FindObjectOfType <PlayerStatement>(); }
void Start() { enemies = FindObjectsOfType <Enemy>(); player = FindObjectOfType <PlayerStatement>(); }