예제 #1
0
    public override void Use(GameObject go)
    {
        controller         = go.GetComponent <SausageController>();
        controller.HasGost = true;

        GhostItemManager.Update(controller, true);
        Manager.GetTimer().New(End, duration, true);
    }
예제 #2
0
    private void AddSausage()
    {
        audioPlayer.PlayOneShot(grow);
        UpdateList();
        GameObject newSausage = Instantiate(sausage, lastSausage.transform.position - lastSausage.transform.up * 2.05f, lastSausage.transform.rotation) as GameObject;

        newSausage.GetComponent <HingeJoint>().connectedBody = lastSausage.GetComponent <Rigidbody>();
        lastSausage = newSausage;
        newSausage.transform.parent = body;
        newSausage.transform.name   = "Sausage (" + lastId + ")";
        newSausage.GetComponent <Sausage>().sauController = this;
        sausages.Add(newSausage);

        if (godMod)
        {
            newSausage.GetComponent <Sausage>().undemagible = true;
        }

        if (hasGhost)
        {
            GhostItemManager.Update(this, true);
        }
    }
예제 #3
0
    //private IEnumerator ReturnLayer () {
    //    yield return new WaitForSeconds(duration);

    //    Destroy(gameObject);
    //}

    public void End()
    {
        GhostItemManager.Update(controller, false);
        controller.HasGost = false;
    }