示例#1
0
    //enemy dies and reports back
    void die()
    {
        alive = false;
        Network.Destroy(this.gameObject);
        Network.RemoveRPCs(networkView.viewID);
        WaveControllerScript wcs = GameObject.Find("WaveController(Clone)").GetComponent("WaveControllerScript") as WaveControllerScript;

        wcs.EnemyKilled();
    }
示例#2
0
    //enemy dies and reports back
    void die()
    {
        alive = false;
        WaveControllerScript wcs = GameObject.Find("WaveController(Clone)").GetComponent("WaveControllerScript") as WaveControllerScript;

        wcs.EnemyKilled();
        Network.Instantiate(explosion, transform.position, Quaternion.identity, 0);
        Network.RemoveRPCs(networkView.viewID);
        Network.RemoveRPCs(transform.parent.transform.networkView.viewID);
        Network.Destroy(transform.parent.gameObject);
    }