Example #1
0
    public override void GoDie()
    {
        if (!isDestory)
        {
            Tools.PlayFollowingParticletByName("SmokeEffect", transform);
            Destroy(gameObject.GetComponent <Collider>());
            Destroy(m_rigidbody);
            isDestory = true;
        }

        HurtedTool.Color2B(GetComponentInChildren <Renderer>().material, new Color(1, 1, 1, 0), 30);
        if (HurtedTool.isChildrenColorB(transform, new Color(1, 1, 1, 0)))
        {
            GameManager.Monsters.Remove(this); Destroy(gameObject);
        }
    }
Example #2
0
    public override void GoDie()
    {
        if (!isDestory)
        {
            Tools.PlayFollowingParticletByName("SmokeEffect", transform);
            Destroy(gameObject.GetComponent <Collider>());
            Destroy(m_rigidbody);
            isDestory = true;
            if (!GameManager.GM.PlayerHaveKeyItem(Var.ItemType.FireBallItem))
            {
                GameManager.playerLaunch.GetItem(Var.ItemType.FireBallItem, 1);
                NPC.SetConver("天之声", "你获得了火球");
                TaskManager.taskManager.CompleteTask(1);
            }
        }

        HurtedTool.Color2B(GetComponentInChildren <Renderer>().material, new Color(1, 1, 1, 0), 30);
        if (HurtedTool.isChildrenColorB(transform, new Color(1, 1, 1, 0)))
        {
            GameManager.Monsters.Remove(this); Destroy(gameObject);
        }
    }