示例#1
0
 // Use this for initialization
 void Start()
 {
     manager     = GameObject.Find("GameManager").GetComponent <CS_Gamemanager>();
     gameManager = FindObjectOfType <CS_Gamemanager>();
     Movement    = GameObject.FindGameObjectWithTag("Player").GetComponent <CS_Player_Movment>();
     movement    = GameObject.FindGameObjectWithTag("Player").GetComponent <movment>();
     CS_Notify.Register(this, "BiggerCoins");
     CS_Notify.Register(this, "ShotCoins");
 }
示例#2
0
    void Start()
    {
        leftOarScript  = GameObject.Find("LeftOars").GetComponent <CS_OarLeftScript>();
        rightOarScript = GameObject.Find("RightOars").GetComponent <CS_OarRightScript>();

        CS_Notify.Register(this, "StartGame");
        CS_Notify.Register(this, "StopMoving");
        CS_Notify.Register(this, "MovementUpgrade");
    }
示例#3
0
 void Start()
 {
     CS_Notify.Register(this, "ChangeStage");
     playerScript = player.GetComponent <CS_Player_Movment>();
     ChangeStage();
     progressPlayer.localPosition = new Vector3(progressPlayer.localPosition.x, -300, progressPlayer.localPosition.z);
     progressEnemy.localPosition  = new Vector3(progressEnemy.localPosition.x, -300, progressEnemy.localPosition.z);
     lastPlayerY = player.transform.position.y;
     lastEnemyY  = tempEnemy.transform.position.y;
 }
示例#4
0
    // Use this for initialization
    void Start()
    {
        CS_Notify.Register(this, "StartTimer");
        pl              = GameObject.FindGameObjectWithTag("Player").GetComponent <CS_Player>();
        timeToDie       = 300f;
        timerHasStarted = false;
        timeToBlink     = false;
        csPB            = GameObject.Find("ProgressBar").GetComponent <CS_PrograssBar>();
        csGTTIP         = GameObject.Find("GTTI prompt").GetComponent <CS_GTTIPrompt>();
        foreach (Transform child in this.transform)
        {
            if (child.tag == ("Text"))
            {
                dCounter.Add(child.GetComponent <Text>());
            }
        }
        for (int i = 0; i < dCounter.Count; i++)
        {
            dCounter[i].text = "";
        }


        foreach (Transform child in this.transform)
        {
            if (child.tag == "Image")
            {
                images.Add(child);
            }
        }
        foreach (Transform child in this.transform)
        {
            if (child.tag == "Arrow")
            {
                arrows.Add(child);
            }
        }
        for (int i = 0; i < images.Count; i++)
        {
            images[i].GetComponent <Image>().enabled = false;
        }
        for (int i = 0; i < arrows.Count; i++)
        {
            arrows[i].GetComponent <Image>().enabled = false;
        }
    }
示例#5
0
    void Start()
    {
        coins            = GameObject.Find("GameManager").GetComponent <CS_Gamemanager>();
        rend             = this.gameObject.GetComponent <SpriteRenderer>();
        whichDamagePoint = 0;
        CS_Notify.Register(this, "EndGame");
        deathAnimation = GetComponent <Animator>();

        foreach (Transform child in this.transform)
        {
            if (child.tag == "Damage")
            {
                damagePoints.Add(child);
                child.GetComponent <ParticleSystem>().Stop();
            }
        }
        highScoreInput = GameObject.Find("HighScoreInput");
        highScoreInput.SetActive(false);
    }
示例#6
0
 void Start()
 {
     CS_Notify.Register(this, "EnemyBoatStart");
     player = GameObject.Find("Player").GetComponent <Transform>();
 }
示例#7
0
 void Start()
 {
     CS_Notify.Register(this, "BiggerCoinsTrue");
     CS_Notify.Register(this, "ShotCoinsTrue");
 }
示例#8
0
 void Start()
 {
     appearTimes = 0;
     CS_Notify.Register(this, "NextTile");
     position = player.position;
 }
示例#9
0
 void Start()
 {
     CS_Notify.Register(this, "CannonUpgrad");
 }
示例#10
0
 void Start()
 {
     CS_Notify.Register(this, "ChangeToArenaCamera");
     CS_Notify.Register(this, "ZoomOut");
     cameraScript = main.GetComponent <CS_Camera_Movment>();
 }
示例#11
0
 void Start()
 {
     CS_Notify.Register(this, "StartGame");
     CS_Notify.Register(this, "StopMoving");
     rb = GetComponent <Rigidbody2D>();
 }