Exemple #1
0
    void Start()
    {
        action_    = GetComponent <SlimeActions>();
        animation_ = GetComponent <SlimeAnimation>();

        action_.addObserver(animation_);
        animation_.addObserver(action_);
    }
    public void Start()
    {
        animator_      = GetComponent <Animator>();
        animController = new AnimationController(animator_);
        slimeActor_    = GetComponent <IGameActor>();

        SlimeActions actions = GetComponent <SlimeActions>();

        actions.addObserver(this);
    }
Exemple #3
0
 // Use this for initialization
 void Start()
 {
     //     HeathPoints = 1f;
     slimeCollider = gameObject.GetComponent <SphereCollider>();
     IsShielded    = false;
     firstColor    = true;
     slimeAction   = gameObject.GetComponent <SlimeActions>();
     isInvincible  = true;
     StartCoroutine(InvincibleFrames());
     slimeMovement = gameObject.GetComponent <SlimeMovement>();
     playerC       = GameObject.FindGameObjectWithTag(slimeMovement.parent).GetComponent <PlayerController>();
 }
    void Start()
    {
        slimeActor_ = GetComponent <IGameActor>();
        SlimeActions actions = GetComponent <SlimeActions>();

        actions.addObserver(this);
        SlimeAnimation anim = GetComponent <SlimeAnimation>();

        anim.addObserver(this);

        player_ = GameObject.FindGameObjectWithTag("Player").transform;

        stateScore_ = new Dictionary <SlimeState, int>();
        foreach (SlimeState state in Enum.GetValues(typeof(SlimeState)))
        {
            stateScore_.Add(state, 0);
        }
    }