// Use this for initialization
    void Start()
    {
        //DialogManager.Instance.setUpDialog (0);

        //CutSceneManager.Instance.animateScene ();

        _levelHandler = FindObjectOfType <LevelLoadHandler> ();

        if (_levelHandler != null)
        {
            if (_levelHandler.returnDiff() == 1)
            {
                //Debug.Log ("Making things harder!");
                Vector3 harderPos = destination.transform.position;
                harderPos.x *= 1.5f;
                destination.transform.position = harderPos;
                Difficulty = 1;
            }

            Destroy(_levelHandler.gameObject);
        }



        counter = 0;
        //Debug.Log (healthImage.fillAmount);
        //gameMode = STATE.ONGOING;

        followShip = false;
    }
Beispiel #2
0
    void applyLeaderEffects(LevelLoadHandler _loadHandler)
    {
        if (_loadHandler != null)
        {
            switch (_loadHandler.getLeader())
            {
            case 0:             // Human
                repairTime        = repairTime / 2;
                repairCap         = repairTime;
                isCriticalWorking = true;
                break;

            case 1:             // Elf
                if (facilityType == type.Evasion)
                {
                    facilityOutput = 40;
                }
                if (facilityType == type.Movement)
                {
                    facilityOutput = 1.25f;
                }
                break;

            case 2:             // Wolfman
                if (facilityType == type.Combat)
                {
                    atkDelay       = 3;
                    delay          = atkDelay;
                    facilityOutput = 40;
                }

                if (facilityType == type.Magic)
                {
                    atkDelay = 4;
                    delay    = atkDelay;
                }

                break;

            case 3:             // Fairy
                shipInteractions.setCurrentHealth(150);
                fHealth       = 40;
                MaximumHealth = fHealth;

                /*
                 * if (facilityType == type.Magic) {
                 *      atkDelay = 4;
                 *      delay = atkDelay;
                 *      facilityOutput = 40;
                 *
                 *      //Higher health
                 *      //shipInteractions.setCurrentHealth(150);
                 *
                 * }
                 */
                break;
            }
        }
    }
 void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
         DontDestroyOnLoad(this);
     }
     else
     {
         if (this != _instance)
         {
             Destroy(this.gameObject);
         }
     }
 }