public void Start()
 {
     impressionMemory = (ImpressionMemory)GetComponent("ImpressionMemory");
     actionRunner = (ActionRunner)GetComponent("ActionRunner");
     neck = (Neck)GetComponentInChildren(typeof(Neck));
     enabled=false;
 }
Exemplo n.º 2
0
    //private ArrayList path;
    public WalkToAction(GameObject actor, GameObject target, float maximumDistance, float minimumDistance, bool follow)
        : base(actor)
    {
        InitAnimationInfo("walk", WrapMode.Loop, Emotion.BodyParts.FACE);
        stoppingForPC = false;
        this.target = target;
        destination = target;

        if (target == null){
            Debug.LogError("WalkToAction.WalkToAction(): " + actor.name + " Can't walk to a null target!");
        }

        this.maximumDistance = maximumDistance;
        this.minimumDistance = minimumDistance;
        this.follow = follow;
        numberOfTroubleshoots = 0;
        numberOfRounds = 0;
        failedGoals = 0;
        pathPlanner = actor.GetComponent(typeof(PathPlanner)) as PathPlanner;
        history = new ArrayList();
        memory = actor.GetComponent(typeof(ImpressionMemory)) as ImpressionMemory;
        //path = null;
    }
    /**************************************************************
     *
     * METHODS FROM MONOBEHAVIOUR
     *
     **************************************************************/
    public void Start()
    {
        CharacterState state = (CharacterState)character.GetComponent(typeof(CharacterState));
        drunkness = state.GetDrunkness();
        state.RegisterStatusListener(this);

        if(CharacterManager.IsPC(character)) {
            memory = null;
        }
        else {
            memory = character.GetComponent(typeof(ImpressionMemory)) as ImpressionMemory;
            memory.RegisterStatusListener(this);
        };
        InitDrunknessAnimation();
        showState = SHOW_STATE.DEFAULT;
        defaultScale = new Vector3(billboardDefSize.x, billboardDefSize.y, billboardDefSize.z);
        renderer.enabled = false;
        enabled = false;
    }