protected void initializeBullet() { spawn_timer = spawn_time; rb2d = gameObject.GetComponent <Rigidbody2D>(); tsfm = gameObject.GetComponent <Transform>(); ID_player = gameObject.GetComponent <player_ID>(); }
// Use this for initialization when application runs but after script is initialized void Start() { rb2d = gameObject.GetComponent <Rigidbody2D> (); tsfm = gameObject.GetComponent <Transform> (); hitBox = transform.FindChild("Driver_Hitbox"); p_id = GetComponent <player_ID>(); speed_level = min_speed; rewired_player = ReInput.players.GetPlayer(p_id.player_number); makeDefender(); }
// Use this for initialization void Start() { tsfm = gameObject.GetComponent <Transform> (); shot_spawn = tsfm.GetChild(0); p_id = GetComponent <player_ID>(); if (driver != null) { p_id.player_number = driver.getPlayerID(); rewired_player = ReInput.players.GetPlayer(p_id.player_number); } }
// use that for instantiation void Awake() { rb2d = GetComponent <Rigidbody2D>(); tsfm = GetComponent <Transform>(); p_id = GetComponent <player_ID>(); }
// Use this for initialization void Start() { driver = gameObject.GetComponentInParent <player_driver>(); p_id = gameObject.GetComponentInParent <player_ID>(); }