Beispiel #1
0
    public void Awake()
    {
        animationAssignments = GetComponent <AnimationAssignments>();
        playerController     = playerGameObject.GetComponent <PlayerController>();

        animationChild = new GameObject("Animation Cycle");
        animationChild.transform.SetParent(transform);
        animationChild.AddComponent <SpriteRenderer>();
        animator = animationChild.AddComponent <Animator>();
    }
Beispiel #2
0
    public void CopyValueAssignmentsToAnotherObject(GameObject source)
    {
        AnimationAssignments controller = source.GetComponent <AnimationAssignments>();

        controller.standing       = standing;
        controller.walking        = walking;
        controller.falling        = falling;
        controller.mopping        = mopping;
        controller.dragging       = dragging;
        controller.climbing       = climbing;
        controller.grabbingButton = grabbingButton;
        controller.grabbingLever  = grabbingLever;
    }