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(); } } }
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(); } } }