Exemple #1
0
 // Use this for initialization
 void Start()
 {
     controlAnimation           = FindObjectOfType <ControlAnimation>();
     scrubber                   = FindObjectOfType <Scrubber>();
     scrubberDirectionText.text = "Scrubber Direction: " + scrubber.scrubberDirection.ToString();
     StartCoroutine(SetDropdown());
 }
        private async Task AnimateToLeftSide(ControlAnimation animationType)
        {
            switch (animationType)
            {
            case ControlAnimation.ToFirstPosition:
                await this.SlideFromRightToFirstPosision(this._slideSecont);

                break;

            case ControlAnimation.ToSecondPosition:
                await this.SlideFromFirstPosisionToSecondPosisionAndGrowUp(this._slideSecont);

                break;

            case ControlAnimation.ToThirdPosition:
                await this.SlideFromCenterPosisionToPosisionOnLeftAndReduce(this.SlideSecont);

                break;

            case ControlAnimation.ToFourthPosition:
                await this.SlideOutToLeft(this.SlideSecont);

                break;
            }
        }
Exemple #3
0
 public void Add(ControlAnimation item)
 {
     this.list.Add(item);
     if (item.animation.Num > this.MaxIndex)
     {
         this.MaxIndex = item.animation.Num;
     }
 }
Exemple #4
0
        public void Add(Animation animation, Control control, string name)
        {
            ControlAnimation item = new ControlAnimation {
                animation = animation,
                control   = control,
                name      = name
            };

            this.Add(item);
        }
 // Used to get reference to components attatched to object
 private void Awake()
 {
     // Setting up references.
     m_GroundCheck  = transform.Find("GroundCheck");
     m_CeilingCheck = transform.Find("CeilingCheck");
     m_Rigidbody2D  = GetComponent <Rigidbody2D>();
     m_PlayerGfx    = transform.Find("gfx");
     if (m_PlayerGfx == null)
     {
         Debug.LogWarning("Could not find gfx child on player");
     }
     m_AnimCtrl = m_PlayerGfx.gameObject.GetComponent <ControlAnimation>();
 }
 public async Task Animation(ControlAnimation animationType)
 {
     if (animationType == ControlAnimation.None)
     {
         return;
     }
     if (IoC.Get <ApplicationViewModel>().SlideFromRightToLeft)
     {
         await AnimateToLeftSide(animationType);
     }
     else
     {
         await AnimateToRightSide(animationType);
     }
 }
 /// <summary>
 /// Adds an animation to the animator.
 /// </summary>
 /// <param name="name">The name of the animation.</param>
 /// <param name="anim">ControlAnimation instance that describes the property and value to animate. Generally used with the MakeAnimation method on controls.</param>
 public void Add(string name, ControlAnimation anim)
 {
     m_anims.Add(name, anim);
 }
Exemple #8
0
 /// <summary>
 /// Adds an animation to the animator.
 /// </summary>
 /// <param name="name">The name of the animation.</param>
 /// <param name="anim">ControlAnimation instance that describes the property and value to animate. Generally used with the MakeAnimation method on controls.</param>
 public void Add(string name, ControlAnimation anim)
 {
     m_anims.Add(name, anim);
 }
Exemple #9
0
    // public RectTransform HandImage;

    private void Awake()
    {
        Instance = this;
    }