public override void doSkill() { if (gasing.getSP() > skillPointNeeded) { targetEnemy = findNearestEnemy(); //cari terus musuh terdekat if (targetEnemy) { gasingEnemy = targetEnemy.GetComponent <Gasing> (); if (GamePrefs.isMultiplayer) { Network.Instantiate(prefab, targetEnemy.transform.position, Quaternion.Euler(270, 0, 0), 11); Network.Instantiate(prefab, targetEnemy.transform.position, Quaternion.Euler(270, 0, 0), 11); Network.Instantiate(prefab, targetEnemy.transform.position, Quaternion.Euler(270, 0, 0), 11); } else { Instantiate(prefab, targetEnemy.transform.position, Quaternion.Euler(270, 0, 0)); Instantiate(prefab, targetEnemy.transform.position, Quaternion.Euler(270, 0, 0)); Instantiate(prefab, targetEnemy.transform.position, Quaternion.Euler(270, 0, 0)); } gasingEnemy.EPKurang(damageInflicted); gasing.SPKurang(skillPointNeeded); //kurangi skillpoint gasing base.doSkill(); } } }
void Awake() { if (!gasing) { gasing = GetComponent <Gasing>(); } }
void Awake() { skillName = "Blink"; skillPointNeeded = 5; if (!gasing) { gasing = GetComponent <Gasing>(); } }
void Awake() { // cooldown = 2f; skillName = "Jump"; skillPointNeeded = 5; if (!gasing) { gasing = GetComponent <Gasing>(); } }
void Awake() { skillName = "Cyclone"; skillPointNeeded = 20; if (!gasing) { gasing = GetComponent <Gasing>(); } prefab = Resources.Load("Prefab/Prefab Obstacle/Cyclone"); }
void Start() { if (!gasing) { gasing = GetComponent <Gasing>(); } timeCount = 0f; isCanUlti = false; ultiActive = false; }
void Awake() { skillName = "EMPTY SOUL"; skillPointNeeded = 20; if (!gasing) { gasing = GetComponent <Gasing>(); } targetEnemies = GameObject.FindGameObjectsWithTag("Enemy"); }
void Start() { timeCounter = 0; timeLimit = default_timeLimit; if (!gasing) { gasing = GetComponent <Gasing>(); } statusName = ""; isStatusApplied = false; }
void Awake() { if (!gasing) { gasing = GetComponent <Gasing>(); } if (!gasing_pt) { gasing_pt = GetComponent <PhysicsTabrak>(); } }
void Awake() { skillName = "Thunder"; skillPointNeeded = 20; damageInflicted = 25; if (!gasing) { gasing = GetComponent <Gasing>(); } prefab = Resources.Load("Prefab/Prefab Obstacle/Thunder"); }
void Awake() { skillName = "Missile"; skillPointNeeded = 20; if (!gasing) { gasing = GetComponent <Gasing>(); } prefabMissile = Resources.Load("Prefab/Prefab Obstacle/Missile"); targetEnemy = GameObject.FindGameObjectWithTag("Enemy"); }
void Awake() { if (!gasing) { gasing = GetComponent <Gasing>(); } teksturHealth = (Texture2D)Resources.Load("Health/HUD_health_04"); teksturHealth2 = (Texture2D)Resources.Load("Health/HUD_health_00"); teksturSkill = (Texture2D)Resources.Load("Health/HUD_health_04"); teksturSkill2 = (Texture2D)Resources.Load("Health/HUD_health_00"); }
public override void doSkill() { if (GamePrefs.isMultiplayer) { targetEnemies = mp_findAllTarget().ToArray(); } else { targetEnemies = GameObject.FindGameObjectsWithTag("Enemy"); } if (gasing.getSP() > skillPointNeeded) { if (targetEnemies.Length > 0) { if (GamePrefs.isMultiplayer) { foreach (GameObject targetEnemy in targetEnemies) { StatusController targetEnemySC = targetEnemy.GetComponent <StatusController>(); Gasing targetEnemyGasing = targetEnemy.GetComponent <Gasing>(); Network.Instantiate((GameObject)Resources.Load("Prefab/Prefab Obstacle/Holy Blast"), targetEnemyGasing.transform.position, Quaternion.Euler(0, 0, 0), 20); if (targetEnemySC) { targetEnemyGasing.EPKurang(targetEnemyGasing.energiPoint * 0.333f); targetEnemySC.applyStatus("StatusFreeze", 10); } } } else { foreach (GameObject targetEnemy in targetEnemies) { StatusController targetEnemySC = targetEnemy.GetComponent <StatusController>(); Gasing targetEnemyGasing = targetEnemy.GetComponent <Gasing>(); Instantiate((GameObject)Resources.Load("Prefab/Prefab Obstacle/Holy Blast"), targetEnemyGasing.transform.position, Quaternion.Euler(0, 0, 0)); if (targetEnemySC) { targetEnemyGasing.EPKurang(targetEnemyGasing.energiPoint * 0.333f); targetEnemySC.applyStatus("StatusFreeze", 10); } } } base.doSkill(); } } }
public override void doSkill() { if (GamePrefs.isMultiplayer) { targetEnemies = mp_findAllTarget().ToArray(); } else { targetEnemies = GameObject.FindGameObjectsWithTag("Enemy"); } if (gasing.getSP() > skillPointNeeded) { if (targetEnemies.Length > 0) { foreach (GameObject targetEnemy in targetEnemies) { StatusController targetEnemySC = targetEnemy.GetComponent <StatusController>(); Gasing targetEnemyGasing = targetEnemy.GetComponent <Gasing>(); PhysicsTabrak targetEnemyPT = targetEnemy.GetComponent <PhysicsTabrak>(); if (targetEnemySC) { targetEnemyGasing.EPKurang(targetEnemyGasing.energiPoint * 0.333f); if (GamePrefs.isMultiplayer) { Network.Instantiate((GameObject)Resources.Load("Effect/Detonator-Simple"), targetEnemyGasing.transform.position, Quaternion.Euler(0, 0, 0), 20); } else { Instantiate((GameObject)Resources.Load("Effect/Detonator-Simple"), targetEnemyGasing.transform.position, Quaternion.Euler(0, 0, 0)); } targetEnemySC.applyStatus("StatusStun", 2.5f); Vector3 heading = targetEnemyGasing.rigidbody.position - gasing.rigidbody.position; Vector3 direction = heading / heading.magnitude; Vector3 mdirXZ = new Vector3(direction.x, 0, direction.z); targetEnemySC.rigidbody.AddForce(mdirXZ * 4000); targetEnemyPT.isInvicibleAfterClash = true; targetEnemyPT.timeCountAfterClash = 0f; targetEnemyPT.geserForce = 600 * mdirXZ; } } } base.doSkill(); } }
public override void doSkill() { if (GamePrefs.isMultiplayer) { targetEnemies = mp_findAllTarget().ToArray(); } else { targetEnemies = GameObject.FindGameObjectsWithTag("Enemy"); } if (gasing.getSP() > skillPointNeeded) { if (targetEnemies.Length > 0) { if (GamePrefs.isMultiplayer) { foreach (GameObject targetEnemy in targetEnemies) { Gasing targetEnemyGasing = targetEnemy.GetComponent <Gasing>(); Network.Instantiate((GameObject)Resources.Load("Effect/Detonator-Simple"), targetEnemyGasing.transform.position, Quaternion.Euler(0, 0, 0), 20); if (targetEnemyGasing) { targetEnemyGasing.EPKurang(targetEnemyGasing.energiPoint * 0.5f); } } } else { foreach (GameObject targetEnemy in targetEnemies) { Gasing targetEnemyGasing = targetEnemy.GetComponent <Gasing>(); Instantiate((GameObject)Resources.Load("Effect/Detonator-Simple"), targetEnemyGasing.transform.position, Quaternion.Euler(0, 0, 0)); if (targetEnemyGasing) { targetEnemyGasing.EPKurang(targetEnemyGasing.energiPoint * 0.5f); } } } base.doSkill(); } } }
void Awake() { if (!gasing) { gasing = GetComponent <Gasing>(); } if (!gasing_pt) { gasing_pt = GetComponent <PhysicsTabrak>(); } if (!skill_con) { skill_con = GetComponent <SkillController>(); } speedAI = 6000; time = 0f; timeGerak = 0f; timeSkill = 0f; }
public override void doSkill() { if (gasing.getSP() > skillPointNeeded) { targetEnemy = findNearestEnemy(); //cari musuh terdekat if (targetEnemy) { gasingEnemy = targetEnemy.GetComponent <Gasing> (); if (GamePrefs.isMultiplayer) { Network.Instantiate(prefab, new Vector3(targetEnemy.transform.position.x, targetEnemy.transform.position.y + 15, targetEnemy.transform.position.z), Quaternion.Euler(0, 0, 0), 12); } else { Instantiate(prefab, new Vector3(targetEnemy.transform.position.x, targetEnemy.transform.position.y + 15, targetEnemy.transform.position.z), Quaternion.Euler(0, 0, 0)); } gasing.SPKurang(skillPointNeeded); base.doSkill(); } } }
void Awake() { base.Awake(); GameObject[] players = GameObject.FindGameObjectsWithTag("Player"); GameObject[] enemies = GameObject.FindGameObjectsWithTag("Enemy"); GameObject[] allies = null; if (Utilities.chosenMode == 1) //team mode { allies = GameObject.FindGameObjectsWithTag("Ally"); } if (!GamePrefs.isMultiplayer || (GamePrefs.isMultiplayer && Network.isServer)) { foreach (GameObject player in players) { Gasing gasing = player.GetComponent <Gasing>(); if (gasing) { gasing.setSpeed(gasing.getSpeed() + 3); //tambahin speed tiap gasing } } } if (!GamePrefs.isMultiplayer) { foreach (GameObject enemy in enemies) { Gasing gasing = enemy.GetComponent <Gasing>(); gasing.setSpeed(gasing.getSpeed() + 3); } if (Utilities.chosenMode == 1) //team mode { foreach (GameObject ally in allies) { Gasing gasing = ally.GetComponent <Gasing>(); gasing.setSpeed(gasing.getSpeed() + 3); } } } clock = 0f; }
protected void Awake() { GameObject menuMusic = GameObject.Find("Background Music"); if (menuMusic) { Destroy(menuMusic); //hancurin background music menu } if (GamePrefs.isMultiplayer) { } else if (Utilities.chosenMode == 0 || Utilities.chosenMode == 2) //royal mode atau arcade mode { jumlahMusuh = Utilities.howManyGasingRoyal - 1; if (!pemain) { if (Utilities.playerGasing != null) { pemain = (GameObject)Instantiate(Resources.Load("Prefab/Prefab Gasing/" + Utilities.playerGasing), new Vector3(0, 1, -15), Quaternion.Euler(270, 0, 0)); //hidupin gasing, pilih prefab } else { pemain = (GameObject)Instantiate(Resources.Load("Prefab/Prefab Gasing/Craseed"), new Vector3(0, 1, -15), Quaternion.Euler(270, 0, 0)); //hidupin gasing, pilih prefab } pemain.name = "Pemain"; if (!gasingPemain) { gasingPemain = pemain.GetComponent <Gasing>(); } } if (Utilities.enemy1 != null) { musuh = (GameObject)Instantiate(Resources.Load("Prefab/Prefab Gasing/" + Utilities.enemy1 + "_Musuh"), new Vector3(0, 1, 10), Quaternion.Euler(270, 0, 0)); } else { musuh = (GameObject)Instantiate(Resources.Load("Prefab/Prefab Gasing/Craseed_Musuh"), new Vector3(0, 1, 10), Quaternion.Euler(270, 0, 0)); } if (Utilities.enemy2 != null) { Instantiate(Resources.Load("Prefab/Prefab Gasing/" + Utilities.enemy2 + "_Musuh"), new Vector3(-5, 1, 10), Quaternion.Euler(270, 0, 0)); } if (Utilities.enemy3 != null) { Instantiate(Resources.Load("Prefab/Prefab Gasing/" + Utilities.enemy3 + "_Musuh"), new Vector3(5, 1, 10), Quaternion.Euler(270, 0, 0)); } if (Utilities.enemy4 != null) { Instantiate(Resources.Load("Prefab/Prefab Gasing/" + Utilities.enemy4 + "_Musuh"), new Vector3(-10, 1, 10), Quaternion.Euler(270, 0, 0)); } if (Utilities.enemy5 != null) { Instantiate(Resources.Load("Prefab/Prefab Gasing/" + Utilities.enemy5 + "_Musuh"), new Vector3(10, 1, 10), Quaternion.Euler(270, 0, 0)); } if (Utilities.enemy6 != null) { Instantiate(Resources.Load("Prefab/Prefab Gasing/" + Utilities.enemy6 + "_Musuh"), new Vector3(-15, 1, 10), Quaternion.Euler(270, 0, 0)); } if (Utilities.enemy7 != null) { Instantiate(Resources.Load("Prefab/Prefab Gasing/" + Utilities.enemy7 + "_Musuh"), new Vector3(15, 1, 10), Quaternion.Euler(270, 0, 0)); } if (Utilities.enemy8 != null) { Instantiate(Resources.Load("Prefab/Prefab Gasing/" + Utilities.enemy8 + "_Musuh"), new Vector3(-5, 1, 15), Quaternion.Euler(270, 0, 0)); } if (Utilities.enemy9 != null) { Instantiate(Resources.Load("Prefab/Prefab Gasing/" + Utilities.enemy9 + "_Musuh"), new Vector3(5, 1, 15), Quaternion.Euler(270, 0, 0)); } // if (!musuh) // { // if(Utilities.enemy1 != null){ // musuh = (GameObject) Instantiate(Resources.Load("Prefab/Prefab Gasing/"+Utilities.enemy1+"_Musuh"), new Vector3(0, 1, 10), Quaternion.Euler(270, 0, 0)); // }else{ // musuh = (GameObject) Instantiate(Resources.Load("Prefab/Prefab Gasing/Craseed_Musuh"), new Vector3(0, 1, 10), Quaternion.Euler(270, 0, 0)); // } // // if(jumlahMusuh > 1){ // if(Utilities.enemy2 != null){ // Instantiate(Resources.Load("Prefab/Prefab Gasing/"+Utilities.enemy2+"_Musuh"), new Vector3(-5, 1, 10), Quaternion.Euler(270, 0, 0)); // }else{ // Instantiate(Resources.Load("Prefab/Prefab Gasing/Craseed_Musuh"), new Vector3(-5, 1, 10), Quaternion.Euler(270, 0, 0)); // } // } // if(jumlahMusuh > 2){ //karena layar ga muat buat pilih gasing, klo musuh lebih dari 2 , musuh diclone dari objek musuh pertama // for (int i = 2; i < jumlahMusuh; i++) // { // if (i <= 4) // { // Instantiate(musuh, new Vector3(i * (-5), 1, 10), Quaternion.Euler(270, 0, 0)); // } // else if (i <= 7) // { // Instantiate(musuh, new Vector3((i - 4) * 5, 1, 10), Quaternion.Euler(270, 0, 0)); // } // else if (i <= 11) // { // Instantiate(musuh, new Vector3((i - 7) * 5, 1, -10), Quaternion.Euler(270, 0, 0)); // } // else if (i <= 14) // { // Instantiate(musuh, new Vector3((i - 11) * (-5), 1, -10), Quaternion.Euler(270, 0, 0)); // } // else if (i <= 17) // { // Instantiate(musuh, new Vector3((i - 14) * 5, 1, -15), Quaternion.Euler(270, 0, 0)); // } // else if (i <= 20) // { // Instantiate(musuh, new Vector3((i - 17) * (-5), 1, -15), Quaternion.Euler(270, 0, 0)); // } // } // } // }//end if !musuh } else //team mode { jumlahMusuh = Utilities.howManyGasingTeam * 2 - 1; if (!pemain) { if (Utilities.playerGasing != null) { pemain = (GameObject)Instantiate(Resources.Load("Prefab/Prefab Gasing/" + Utilities.playerGasing), new Vector3(0, 1, -15), Quaternion.Euler(270, 0, 0)); //hidupin gasing, pilih prefab } else { pemain = (GameObject)Instantiate(Resources.Load("Prefab/Prefab Gasing/Craseed"), new Vector3(0, 1, -15), Quaternion.Euler(270, 0, 0)); //hidupin gasing, pilih prefab } pemain.name = "Pemain"; if (!gasingPemain) { gasingPemain = pemain.GetComponent <Gasing>(); } } if (!musuh) { if (Utilities.enemy1 != null) { musuh = (GameObject)Instantiate(Resources.Load("Prefab/Prefab Gasing/" + Utilities.enemy1 + "_Musuh"), new Vector3(0, 1, 10), Quaternion.Euler(270, 0, 0)); } if (Utilities.enemy2 != null) { Instantiate(Resources.Load("Prefab/Prefab Gasing/" + Utilities.enemy2 + "_Musuh"), new Vector3(-5, 1, 10), Quaternion.Euler(270, 0, 0)); } if (Utilities.enemy3 != null) { Instantiate(Resources.Load("Prefab/Prefab Gasing/" + Utilities.enemy3 + "_Musuh"), new Vector3(5, 1, 10), Quaternion.Euler(270, 0, 0)); } Debug.Log("++++++++++++++++ " + Utilities.ally1); if (Utilities.ally1 != null) { GameObject teman1 = (GameObject)Instantiate(Resources.Load("Prefab/Prefab Gasing/" + Utilities.ally1 + "_Musuh"), new Vector3(5, 1, -15), Quaternion.Euler(270, 0, 0)); teman1.tag = "Ally"; } if (Utilities.ally2 != null) { GameObject teman2 = (GameObject)Instantiate(Resources.Load("Prefab/Prefab Gasing/" + Utilities.ally2 + "_Musuh"), new Vector3(-5, 1, -15), Quaternion.Euler(270, 0, 0)); teman2.tag = "Ally"; } } //end if !musuh } //end if team mode }