コード例 #1
0
ファイル: ReferenceScript.cs プロジェクト: Grapull/AwkTurt
	void Start () {
		cameraMoveScript = Cam.GetComponent<CameraMoveScript> ();
		deathScript = Turtle.GetComponent<DeathScript> ();
		rotatesemi = Turtle.GetComponent<rotateSemi> ();
		setsortingLayer = ShaderCube.GetComponent<setSortingLayer> ();
		turtleMovementScript = Turtle.GetComponent<TurtleMovementScript> ();
	}
コード例 #2
0
 void Start()
 {
     cameraMoveScript     = Cam.GetComponent <CameraMoveScript> ();
     deathScript          = Turtle.GetComponent <DeathScript> ();
     rotatesemi           = Turtle.GetComponent <rotateSemi> ();
     setsortingLayer      = ShaderCube.GetComponent <setSortingLayer> ();
     turtleMovementScript = Turtle.GetComponent <TurtleMovementScript> ();
 }
コード例 #3
0
    //System Functions (unity called functions)
    void Start()
    {
        //init variables
        reloadGuiText          = "Press 'R' to reload.";
        reloadGui.text         = "";
        reloading              = false;
        reloadingTextActiveTxt = "Reloading..";
        reloadingInfoGui.text  = "";

        guiWeaponText = guiWeaponTextGameObj.GetComponent <GUIText>();

        cameraComp   = cameraGameOb.GetComponent <Camera> ();
        cameraScript = cameraGameOb.GetComponent <CameraMoveScript> ();
        //init currentWeapon, WEAPON SPECS AND WeaponList
        weaponList    = new string[3];
        weaponList[0] = "Pistol";
        weaponList[1] = "SMG";
        weaponList[2] = "Shotgun";

        pistolMaxClip        = 19;
        pistolFireRate       = 0.25f;  // def is 0.25
        pistolAccuracy       = 3.2f;   //def is 3.2
        pistolCameraShake    = 130;    // def is 60
        pistolBulletsPerShot = 1;
        pistolReloadTime     = 0.8f;

        smgMaxClip        = 30;
        smgFireRate       = 0.18f;
        smgAccuracy       = 2.8f;
        smgCameraShake    = 150;     // de f i s 150
        smgBulletsPerShot = 1;
        smgReloadTime     = 0.8f;

        shotgunMaxClip        = 8;
        shotgunFireRate       = 0.5f;
        shotgunAccuracy       = 4.0f;  // def is 4.0
        shotgunCameraShake    = 200;
        shotgunBulletsPerShot = 6;     //def is 6
        shotgunReloadTime     = 3.0f;

        //activate the starting weapon (pistol)
        Clip            = pistolMaxClip;
        fireRate        = pistolFireRate;
        currentWeapon   = "Pistol";       //starting weapon
        accuracy        = pistolAccuracy;
        cameraShake     = pistolCameraShake;
        bulletsPerShot  = pistolBulletsPerShot;
        reloadTimeDelay = pistolReloadTime;

        //init guis
        guiWeaponText.text      = currentWeapon + "" + Clip + "/" + pistolMaxClip;    //starting weapon is pistol
        guiItemPickupNotif.text = "";
    }
コード例 #4
0
    void Start()
    {
        cameraMoveScript = FindObjectOfType <CameraMoveScript>();
        foreach (Character character in FindObjectsOfType <Character>())
        {
            if (character.type == Character.CharacterType.PoliceMan)
            {
                playerCharacters.Add(character, new CharacterInfo(character));
            }
            else
            {
                enemyCharacters.Add(character, new CharacterInfo(character));
            }
        }

        uiMenuWinLoseScript = FindObjectOfType <UIMenuWINLoseScript>();
        uiLevelScript       = FindObjectOfType <UILevelScript>();

        uiLevelScript.ShowMenu(false);
        StartCoroutine(GameLoop());
    }
コード例 #5
0
    //System Functions (unity called functions)
    void Start()
    {
        //init variables
        reloadGuiText = "Press 'R' to reload.";
        reloadGui.text = "";
        reloading = false;
        reloadingTextActiveTxt = "Reloading..";
        reloadingInfoGui.text = "";

        guiWeaponText = guiWeaponTextGameObj.GetComponent<GUIText>();

        cameraComp = cameraGameOb.GetComponent<Camera> ();
        cameraScript = cameraGameOb.GetComponent<CameraMoveScript> ();
        //init currentWeapon, WEAPON SPECS AND WeaponList
        weaponList = new string[3];
        weaponList[0] = "Pistol";
        weaponList[1] = "SMG";
        weaponList[2] = "Shotgun";

        pistolMaxClip = 19;
        pistolFireRate = 0.25f;// def is 0.25
        pistolAccuracy = 3.2f; //def is 3.2
        pistolCameraShake = 130; // def is 60
        pistolBulletsPerShot = 1;
        pistolReloadTime = 0.8f;

        smgMaxClip = 30;
        smgFireRate = 0.18f;
        smgAccuracy = 2.8f;
        smgCameraShake = 150;// de f i s 150
        smgBulletsPerShot = 1;
        smgReloadTime = 0.8f;

        shotgunMaxClip = 8;
        shotgunFireRate = 0.5f;
        shotgunAccuracy = 4.0f;// def is 4.0
        shotgunCameraShake = 200;
        shotgunBulletsPerShot = 6; //def is 6
        shotgunReloadTime = 3.0f;

        //activate the starting weapon (pistol)
        Clip = pistolMaxClip;
        fireRate = pistolFireRate;
        currentWeapon = "Pistol"; //starting weapon
        accuracy = pistolAccuracy;
        cameraShake = pistolCameraShake;
        bulletsPerShot = pistolBulletsPerShot;
        reloadTimeDelay = pistolReloadTime;

        //init guis
        guiWeaponText.text = currentWeapon + "" + Clip + "/" + pistolMaxClip; //starting weapon is pistol
        guiItemPickupNotif.text = "";
    }
コード例 #6
0
 void Awake()
 {
     CameraMove = this;
 }