コード例 #1
0
 //Connects pigMovement scripts to control their activation states from here in GM
 //If you add another pig you need to add to this function!
 private void ConnectPigScripts()
 {
     pigLMvt      = pigL.GetComponent <PigMovement> ();
     pigRMvt      = pigR.GetComponent <PigMovement> ();
     pigMidVMvt   = pigMidV.GetComponent <PigMovement> ();
     pigMidHMvt   = pigMidH.GetComponent <PigMovement> ();
     pigMidBoxMvt = pigMidBox.GetComponent <PigMovement> ();
 }
コード例 #2
0
ファイル: Score.cs プロジェクト: Team-SunsetCS113/flappy-pig
    void Start()
    {
        instance = this;
        GameObject player_go = GameObject.FindGameObjectWithTag("Player");
        if(player_go == null ) {
            Debug.LogError("Could not find an object with tag 'Player'.");
        }

        bird = player_go.GetComponent<PigMovement>();
        score = 0;
        highScore = PlayerPrefs.GetInt("highScore", 0);
    }
コード例 #3
0
ファイル: PigPowerup.cs プロジェクト: JsStudiosGames/AllGames
 private void Start()
 {
     script  = GetComponent <PigMovement>();
     script2 = GetComponent <CharacterController2D>();
 }
コード例 #4
0
 void Awake()
 {
     current = this;
     moved   = false;
     //nav = GetComponent<NavMeshAgent>();
 }