void Start() { animMario = GameObject.Find("Player").GetComponent <Animator>(); rbMario = GameObject.Find("Player").GetComponent <Rigidbody2D>(); transPipe = GetComponent <Transform> (); gC = GameObject.Find("global_controller").GetComponent <scr_GameController>(); }
void Start() { gC = GameObject.Find("global_controller").GetComponent <scr_GameController>(); txtScore = GameObject.Find("TxtMarioQnt").GetComponent <Text> (); txtLife = GameObject.Find("TxtLifeQnt").GetComponent <Text> (); txtCoin = GameObject.Find("TxtCoinQnt").GetComponent <Text> (); }
void Start() { rb = GetComponent <Rigidbody2D> (); anim = GetComponent <Animator> (); initPos = rb.transform.position; gC = GameObject.Find("global_controller").GetComponent <scr_GameController>(); rb.AddForce(new Vector2(0, 20), ForceMode2D.Impulse); }
void Start() { rb = GetComponent <Rigidbody2D> (); initPos = rb.position.y; rb.velocity = new Vector2(velX, velY); gC = GameObject.Find("global_controller").GetComponent <scr_GameController>(); scr_GameController.play_sound(scr_GameController.Sound.SPROUT); }
private void Awake() { DontDestroyOnLoad(gameObject); if (!instance) { instance = this; } else if (instance != this) { Destroy(gameObject); } }
// void FindGC() { GameObject gameControllerObject = GameObject.FindWithTag("GameController"); if (gameControllerObject != null) { gameController = gameControllerObject.GetComponent <scr_GameController>(); if (gameControllerObject.GetComponent <scr_GameController>().powerupAction != null) { powerupAction = gameControllerObject.GetComponent <scr_GameController>().powerupAction; } } }
void FindGC() { GameObject gameControllerObject = GameObject.FindWithTag("GameController"); if (gameControllerObject != null) { gameController = gameControllerObject.GetComponent <scr_GameController> (); } if (gameController == null) { Debug.Log("Cannot Find 'GameController' Script"); } }
void Start() { rigid_fire = GetComponent <Rigidbody2D>(); gC = GameObject.Find("global_controller").GetComponent <scr_GameController>(); mario_object = GameObject.Find("Player").GetComponent <MarioLuigi>(); if (mario_object.isDirRight() == false) { velX = -velX; } rigid_fire.AddForce(new Vector2(0, 2), ForceMode2D.Impulse); }
//private int current_state = 0; void Start() { rigidKoopaGreen = GetComponent <Rigidbody2D>(); transKoopaGreen = GetComponent <Transform>(); animKoopaGreen = GetComponent <Animator>(); boxKoopaGreen = GetComponent <BoxCollider2D> (); sprite = GetComponent <SpriteRenderer> (); velX = -Mathf.Abs(velX); KoopaState current_state = KoopaState.NORMAL; gC = GameObject.Find("global_controller").GetComponent <scr_GameController>(); }
void Start() { rigidbody = GetComponent <Rigidbody2D>(); gC = GameObject.Find("global_controller").GetComponent <scr_GameController>(); }
// Use this for initialization void Start() { rigidBowser = GetComponent <Rigidbody2D>(); gC = GameObject.Find("global_controller").GetComponent <scr_GameController>(); velX = -Mathf.Abs(velX); }