// Start is called before the first frame update void Start() { jumpFlag = false; player = this; rb = GetComponent <Rigidbody>(); plateFlag = false; reboundFlag = false; }
private bool isW = true;//for keyboard void Awake() { if (instance == null) { instance = this; } tr = GetComponent <Transform>(); //rb = GetComponent<Rigidbody2D>(); isGrounded = false; m_GroundCheck = transform.Find("GroundCheck"); }
// Start is called before the first frame update void Start() { PS = Player.GetComponent <PlayerScr>(); PS.ES = ES; if (GM.onFinalLevel1) { getAllyFinal(); ES.tag = "Player"; ES.ally = true; ES.gameObject.layer = 15; foreach (Transform child in ES.transform) { if (child.gameObject.tag == "Enemy") { child.gameObject.tag = "Player"; } if (child.gameObject.layer == 11) { child.gameObject.layer = 15; } } ES.AIList.Add(Light); ES.AIList.Add(Middle); ES.AIList.Add(Heavy); } else if (level == 2 && GM.statusE[ES.ID] == false) { ES = Enemy.GetComponent <EnemyScr>(); ES.currentHP = 0; ES.tag = "wall"; foreach (Transform child in ES.transform) { if (child.gameObject.tag == "Enemy") { child.gameObject.tag = "wall"; } } } else if (level == 5 && GM.statusE[ES.ID] == false) { ES = Enemy.GetComponent <EnemyScr>(); ES.tag = "Player"; ES.ally = true; ES.gameObject.layer = 15; foreach (Transform child in ES.transform) { if (child.gameObject.tag == "Enemy") { child.gameObject.tag = "Player"; } if (child.gameObject.layer == 11) { child.gameObject.layer = 15; } } ES.AIList.Add(Light); ES.AIList.Add(Middle); } else { ES = Enemy.GetComponent <EnemyScr>(); } if (image == null) { Debug.LogError("Error: No image on " + name); } if (level > 2 && level < 5) { startQ = startQM; midQ = midQM; lowQ = lowQM; deathQ = deathQM; } else if (level > 5 && level < 8) { startQ = startQL; midQ = midQL; lowQ = lowQL; deathQ = deathQL; } }
void Awake() { if (instance == null) instance = this; tr = GetComponent<Transform>(); //rb = GetComponent<Rigidbody2D>(); isGrounded = false; m_GroundCheck = transform.Find("GroundCheck"); }
void Awake() { PlayerSing = this; }