Esempio n. 1
0
 void Start()
 {
     /* Initialize Components */
     anim      = GetComponent <Animator>();
     player    = PlayerMovement.instance;
     overworld = OverworldManager.instance;
 }
Esempio n. 2
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Esempio n. 3
0
    void Start()
    {
        //fking annoying editor reseting shit
        Time.timeScale = 1f;

        OverworldManager.Initialize();
    }
Esempio n. 4
0
 void Awake()
 {
     if (instance != null)
     {
         Destroy(this.gameObject);
     }
     else
     {
         instance = this;
     }
 }
Esempio n. 5
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Debug.Log("A OverworldManager already exists");
         Destroy(gameObject);
     }
 }
Esempio n. 7
0
    /**
     * get references to all necessary managers
     */
    void Awake()
    {
        CurrentLevel = startingLevel;
        if (!ignoreSeed)
        {
            Random.InitState(seed);
        }
        currentState = GameState.Overworld;

        levelLoader      = FindObjectOfType <LevelLoader>();
        overworldManager = FindObjectOfType <OverworldManager>();
        combatManager    = FindObjectOfType <CombatManager>();
        levelManager     = FindObjectOfType <LevelManager>();
    }
Esempio n. 8
0
    IEnumerator ExecuteAsync()
    {
        //AI think delay
        yield return(new WaitForSeconds(_random.Next(1, 5) * .5f));

        for (int i = 0; i < _fleets.Count; i++)
        {
            Plan(_fleets[i]);
            //for less static movement
            yield return(new WaitForSeconds(_random.Next(1, 5) * .1f));
        }

        OverworldManager.EndCurrentTurn();
    }
Esempio n. 9
0
    void Awake()
    {
        /* Initialize Instance (Throw Error If More Than One) */
        if (instance != null)
        {
            Debug.LogError("More than one Overworld Manager in this scene.");
        }
        else
        {
            instance = this;
        }

        /* Set Current Time */
        time = System.DateTime.Now;
    }
Esempio n. 10
0
 // Start is called before the first frame update
 void Start()
 {
     if (instance != null)
     {
         Debug.LogWarning("messed up");
     }
     instance = this;
     if (GlobalManager.instance.start == false)
     {
         foreach (baseStats person in GlobalManager.instance.currentParty)
         {
             person.transform.position = startLocation.position;
         }
         GlobalManager.instance.start = true;
     }
 }
Esempio n. 11
0
 // Start is called before the first frame update
 void Start()
 {
     om    = FindObjectOfType <OverworldManager>();
     eaHUD = FindObjectOfType <EnemiesAliveHUD>();
     index = PaintInfo.index;
     if (index > -1)
     {
         rt     = rtArr[index];
         sm     = smArr[index];
         width  = (int)rt.rect.width;
         height = (int)rt.rect.height;
         sW     = brush.width;
         sH     = brush.height;
         stamp  = BuildStamp();
         ClearPaper();
     }
 }
    public void Start()
    {
        // Cannot be initialized during Awake!!
        overworld = Overworld.GetInstance();
        oManager  = OverworldManager.GetInstance();

        m_MyRigidbody2D    = GetComponent <Rigidbody2D>();
        m_NextMovementTime = Time.time;
        var localPoint = new Vector3Int(Mathf.FloorToInt(transform.position.x),
                                        Mathf.FloorToInt(transform.position.y), 0);

        // Start off position
        if (OnCursorMove != null)
        {
            OnCursorMove(localPoint);
        }
    }
Esempio n. 13
0
 public void Restart()
 {
     OverworldManager.Restart();
 }
Esempio n. 14
0
    // [Header("UI")]
    // [Space(5)]
    // public GameObject onScrapPanel;

    void Awake()
    {
        OM = this;
    }
Esempio n. 15
0
 private void Awake()
 {
     instance = this;
 }
Esempio n. 16
0
 void Start()
 {
     /* Initialize Components */
     overworld = OverworldManager.instance;
     player    = PlayerMovement.instance;
 }
 void MovePlayerFleet(Vector3 position)
 {
     PlayerData.fleet.Move(position);
     OverworldManager.EndCurrentTurn();
 }