void Start()
        {
            if (Directory.GetFiles(Directory.GetCurrentDirectory().ToString()).Length > 1)
            {
                numOfLoadedMods = Directory.GetFiles(Directory.GetCurrentDirectory()).Length - 1;
            }
            lvlBeforeEnable = go.GeneralGameState.UserInfo.GetShipLevel;
            hasAdded        = false;
            if (!File.Exists(Path.Combine(Application.dataPath, @"..\Mods\warning.json")))
            {
                File.WriteAllText(Path.Combine(Application.dataPath, @"..\Mods\warning.json"), "TurnedOff...");
            }
            var readTheWarning = File.ReadAllText(Path.Combine(Application.dataPath, @"..\Mods\warning.json"));

            switch (readTheWarning)
            {
            case "TurnedOn...":
                warningSkipYN = true;
                break;

            case "TurnedOff...":
                warningSkipYN = false;
                break;

            default:
                warningSkipYN = false;
                break;
            }
        }
Beispiel #2
0
 // Start is called before the first frame update
 void Start()
 {
     currentHealth = maxHealth;
     FindObjectOfType <HealthBar>().SetMaxHealth(maxHealth);
     SetUpMoveBoundaries();
     shiplevel = FindObjectOfType <ShipLevel>();
 }
Beispiel #3
0
 void Awake()
 {
     if (body == null)
     {
         body = this.gameObject.GetComponent <Rigidbody2D>();
     }
     if (status == null)
     {
         status = GetComponent <PlayerStatus>();
     }
     invicibleTime = invincibilityTime;
     cooldownTime  = shootCooldown;
     blaster       = this.gameObject.GetComponent <BlasterController>();
     level         = this.gameObject.GetComponent <ShipLevel>();
 }
 public PlayerBuilder WithLevel(ShipLevel level)
 {
     _level = level;
     return(this);
 }
 public void ChangeShipLevel(ShipLevel lvl)
 {
     level = lvl;
 }