示例#1
0
    void ItemBoxBirth() // 아이템 생성확률 구하기.
    {
        portalActivation = parentPortal.GetComponent <PortalActivation>();
        int randomNumber1 = Random.Range(0, 10000);

        if (randomNumber1 > 6666)
        {
            int randomNumber2 = Random.Range(0, 10000);
            if (randomNumber2 < item01Chance + ValueDeliverScript.powerUpDropChance)
            {
                int itemLevel = 1;
                activate.ItemActivation(transform.position, itemLevel);
            }
            else if (randomNumber2 < item11Chance)
            {
                int itemLevel = 11;
                activate.ItemActivation(transform.position, itemLevel);
            }
            else if (randomNumber2 <= item61Chance)
            {
                int itemLevel = 61;
                activate.ItemActivation(transform.position, itemLevel);
            }


            //차후 추가되는 아이템에 대한 것은 이부분에 이프문으로 연결하여 작성한다.
        }
        if (portalActivation.gameObject.activeSelf == true)
        {
            portalActivation.ufoOn = false;
            portalActivation.IsDeactivate();
        }
    }
示例#2
0
 private void Start()
 {
     bossArray = new bossStatus[amountOfBossesInScene];
     bossIndex = 0;
     portal    = GetComponent <PortalActivation>();
     SetToAlive();
 }
示例#3
0
 public void ExploActivate(GameObject parentPortal)
 {
     this.parentPortal = parentPortal;
     //Debug.Log(this.parentPortal + "::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::");
     portalActivation    = parentPortal.GetComponent <PortalActivation>();
     isLevelChangeBomb01 = false;
     string[] name;
     name = gameObject.name.Split('0');
     //Debug.Log("폭파되는 오브젝트 이름 :: "+name[0]);
     ufoObj = gameObject.transform.FindChild(name[0]).gameObject;
     ufoObj.GetComponent <AttackWhilteScript>().WhiteAct();
 }