예제 #1
0
    void Start()
    {
        instance = this;

        //Bullets antiAll = new Bullets();
        antiDepressants   = new Bullets(Bullets.BulletsType.antiDepressants, "สลายยาเสพติดประเภท 1", 50, 5, "best bullet forever", sprites[0], bulletsPrefab[1]);
        antiHallucinogens = new Bullets(Bullets.BulletsType.antiHallucinogens, "สลายยาเสพติดประเภท 2", 20, 5, "boom", sprites[1], bulletsPrefab[2]);
        //Bullets antiStimulants = new Bullets();
        //Bullets antiMultipleEffect = new Bullets();

        if (isAddAntiAll)
        {
        }

        if (isAddAntiDepressants)
        {
            bullets.Add(antiDepressants);
        }

        if (isAddAntiHallucinogens)
        {
            bullets.Add(antiHallucinogens);
        }

        if (isAddAntiStimulants)
        {
        }

        if (isAddAntiMultipleEffect)
        {
        }
    }
예제 #2
0
    void Start()
    {
        instance = this;

        antiDepressants    = new Bullets(Bullets.BulletsType.antiDepressants, "ประเภทกดประสาท", 50, 5, "Depressants", sprites[0], bulletsPrefab[0]);
        antiStimulants     = new Bullets(Bullets.BulletsType.antiStimulants, "ประเภทกระตุ้นประสาท", 50, 5, "", sprites[1], bulletsPrefab[1]);
        antiHallucinogens  = new Bullets(Bullets.BulletsType.antiHallucinogens, "ประเภทหลอนประสาท", 50, 5, "Hallucinogens", sprites[2], bulletsPrefab[2]);
        antiMultipleEffect = new Bullets(Bullets.BulletsType.antiMultipleEffect, "ประเภทออกฤทษ์ผสมผสาน", 50, 5, "", sprites[3], bulletsPrefab[3]);

        if (LevelManager.instance.currentLv == 1)
        {
            bullets.Add(antiDepressants);
            if (LevelManager.isLoadGameSave)
            {
                bullets[0].currentBullets = bullet01_qty;
            }
        }
        if (LevelManager.instance.currentLv == 2)
        {
            bullets.Add(antiDepressants);
            bullets.Add(antiStimulants);
        }
        if (LevelManager.instance.currentLv == 3)
        {
            bullets.Add(antiDepressants);
            bullets.Add(antiStimulants);
            bullets.Add(antiHallucinogens);
            bullets.Add(antiMultipleEffect);
        }
    }
 private void Start()
 {
     instance      = this;
     deagleBullets = 0;
     b556          = 0;
     akScar        = 0;
 }
예제 #4
0
 void Awake()
 {
     if (bc == null)
     {
         DontDestroyOnLoad(gameObject);
         bc = this;
     }
     else if (bc != this)
     {
         Destroy(gameObject);
     }
 }
예제 #5
0
    public void BulletsSynchronization(Vector3 muzzlePos, Quaternion direction, int bulletsTeam, int playerID)
    {
        GameObject bulletPrefab = (GameObject)Resources.Load("SphereBullet");
        GameObject bullets      = Instantiate(bulletPrefab, muzzlePos, direction);

        BulletsController bc = bullets.GetComponent <BulletsController>();

        bc.teamColor = (TeamColor)bulletsTeam;
        force        = 5000;
        bullets.GetComponent <Rigidbody>().AddForce(bullets.transform.forward * force);
        bc.originPlayer = this.gameObject;
        //bc.originChara = originChara;
        bc.ownerID  = photonView.ownerId;
        bc.playerID = playerID;
        bc.Initialize(PhotonNetwork.player.ID == playerID);
    }