Beispiel #1
0
    private void Start()
    {
        sm = GameObject.Find("GameZone").GetComponent <SoundManager>();

        StartCoroutine(ShootCaroutine(shootDelay));

        ship = GameObject.Find("Player").GetComponent <PleyerController>();
    }
Beispiel #2
0
    public int countExBosses = -1;  // для того, что бы отслеживать сколько ексБоссов доступно в DefeatedBossesGeneration

    private void Start()
    {
        if (!isBoss)
        {
            lifePoints = PlayerPrefs.GetInt("lifePoints");
            shootDelay = PlayerPrefs.GetFloat("shootDelay");
        }


        sm = GameObject.Find("GameZone").GetComponent <SoundManager>();

        StartCoroutine(ShootCaroutine(shootDelayStart));

        ship = GameObject.Find("Player").GetComponent <PleyerController>();
    }
Beispiel #3
0
    //攻撃が当たった時
    void OnTriggerEnter2D(Collider2D other)
    {
        float x = trans.localScale.x;

        if (other.gameObject.tag == "Player")
        {
            Debug.Log("ヒット");
            pcon.GetCoin();
            Status otSt = other.gameObject.GetComponent <Status>();
            otSt.LostCoin();

            PleyerController pc = other.gameObject.GetComponent <PleyerController>();
            //pc.LostCoin();
            pc.Knockback(x);

            //Rigidbody2D rig = other.gameObject.GetComponent<Rigidbody2D>();
            //rig.AddForce(new Vector2(x * 10, 0), ForceMode2D.Impulse);
        }
    }
Beispiel #4
0
 private void Start()
 {
     if (gameObject.tag == "Enemy")
     {
         speed = PlayerPrefs.GetFloat("speedEnemy");
     }
     else if (gameObject.tag == "enemyBull")
     {
         speed = 4f + PlayerPrefs.GetFloat("speedEnemy");
     }
     try
     {
         Ship      = GameObject.Find("Player").GetComponent <PleyerController>();
         pauseMenu = GameObject.Find("PauseMenu").GetComponent <PauseMenu>();
     }
     catch (System.Exception)
     {
     }
 }
Beispiel #5
0
    // Start is called before the first frame update
    public virtual void Start()
    {
        _parent = transform.root.gameObject;
        pNum    = _parent.GetComponent <PlayerNoSelect>().num;

        weather = GameObject.Find("backG").GetComponent <ChangeWeather>();
        pCon    = this.GetComponent <PleyerController>();

        cct = GameObject.Find(pNum + "PCount").GetComponent <CoinCountText>();

        nowWeather = (int)weather.NowWeather();

        sig = GameObject.Find("Signal").GetComponent <Signal>();

        gamePlay = GameObject.Find("GamePlayScene").GetComponent <GamePlay>();
        //ChangeStatus();
        //powersprite = transform.GetChild(2).GetComponent<GameObject>();

        //audioSource = GetComponent<AudioSource>();
    }
Beispiel #6
0
 void Start()
 {
     Ship = GameObject.Find("Player").GetComponent <PleyerController>();
     sm   = GameObject.Find("GameZone").GetComponent <SoundManager>();
 }
Beispiel #7
0
 // Start is called before the first frame update
 void Start()
 {
     _parent = transform.parent.gameObject;
     pcon    = _parent.GetComponent <PleyerController>();
 }