示例#1
0
 void Start()
 {
     spawner          = FindObjectOfType <spawnManager>();
     startTime        = spawner.timeLeft;
     cactusController = FindObjectOfType <CactusController>();
     lastRotateValue  = cactusController.getRVValue(energyChargeControl);
     Reset();
 }
示例#2
0
    void CreateCactus()
    {
        int       RandCactus = (int)Random.Range(0, 6);
        Transform Cactus     = CactusPrefabs[RandCactus];

        Transform        tClactus = Instantiate(Cactus, transform.position, transform.rotation) as Transform;
        CactusController tcCactus = tClactus.GetComponent <CactusController>();

        tcCactus.Dino          = Dino;
        tcCactus.Point2Destroy = Point2Destroy;
        tcCactus.score         = score;
        tcCactus.ppause        = ppause;
    }
示例#3
0
文件: Gate.cs 项目: srdicmonika/imge2
 // Use this for initialization
 void Start()
 {
     cactusController = FindObjectOfType <CactusController>();
     scoreManager     = GameObject.Find("ScoreManager").GetComponent <ScoreManager>();
 }