示例#1
0
 // Use this for initialization
 void Start()
 {
     player = FindObjectOfType <PlayerMomentumAgain>();
     //Get the animator, attached to the GameObject you are intending to animate.
     m_Animator = gameObject.GetComponent <Animator>();
     maxspeed   = player.maxspeed;
 }
示例#2
0
 // Use this for initialization
 void Start()
 {
     player = FindObjectOfType <PlayerMomentumAgain>();
     //Fetch the SpriteRenderer of the Sprite
     m_SpriteRenderer        = GetComponent <SpriteRenderer>();
     m_SpriteRenderer.sprite = sprite1;
     //Output the current Texture of the Sprite (this returns the source Sprite if the Texture isn't packed)
 }
示例#3
0
 char dir = 'R'; //1 equals right
 // Use this for initialization
 void Start()
 {
     player = FindObjectOfType <PlayerMomentumAgain>();
 }