void Awake() { PowerSlider = PowerBar1.GetComponent <Slider>(); SetAngle = Player.GetComponent <SetAngle>(); SetPower = Player.GetComponent <SetPower>(); }
private int previousScore = 0; // The score in the previous frame. void Awake() { CameraFollow = Camera.GetComponent <CameraFollow>(); CameraFollow.SetState(1); FallInToDark = Line.GetComponent <FallInToDark>(); playerCtrl1 = Player1.GetComponent <PlayerControl>(); playerCtrl1.Reset(false); playerCtrl2 = Player2.GetComponent <PlayerControl>(); playerCtrl2.Reset(true); gun1 = Gun1.GetComponent <Gun>(); gun2 = Gun2.GetComponent <Gun>(); SetAngle1 = Player1.GetComponent <SetAngle>(); SetPower1 = Player1.GetComponent <SetPower>(); SetAngle11 = Player1.GetComponent <SetAngle1>(); SetPower11 = Player1.GetComponent <SetPower1>(); PlayerHeal1 = Player1.GetComponent <PlayerHealth>(); PlayerHeal2 = Player2.GetComponent <PlayerHealth>(); SetAngle2 = Player2.GetComponent <SetAngle>(); SetAngle2.Setstate(true); SetPower2 = Player2.GetComponent <SetPower>(); SetPower2.Setstate(true); SetAngle21 = Player2.GetComponent <SetAngle1>(); SetAngle21.Setstate(true); SetPower21 = Player2.GetComponent <SetPower1>(); SetPower21.Setstate(true); // Setting up the reference. //playerControl = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerControl>(); }
void Awake() { // Setting up the references. anim = Player.GetComponent <Animator>(); playerCtrl = Player.GetComponent <PlayerControl>(); SetAngle = Player.GetComponent <SetAngle>(); SetPower = Player.GetComponent <SetPower>(); //print(playerCtrl); }