Пример #1
0
 // Use this for initialization
 void Start()
 {
     controller = TurnController.GetInstance();
     controller.NotifyCharactersChange += UpdateCharacters;
     Debug.Log("Camera registered to TurnController");
     characters  = controller.GetActiveCharacters();
     relativePos = Vector3.zero;
     centerPos   = Vector3.zero;
     cam         = GetComponentInChildren <Camera>();
     //TODO event to add and remove enemies and allies
 }
Пример #2
0
    protected virtual void Initialize()
    {
        controller = TurnController.GetInstance();
        controller.OnCharacterEnter(this.gameObject);

        events = EventController.GetInstance();

        mainCamera      = Camera.main;
        character       = transform.Find("body");
        agent           = GetComponent <NavMeshAgent>();
        skills          = new List <Skill>(GetComponents <Skill>());
        agent.isStopped = true;
        stats           = GetComponent <CharacterStats>();
    }
Пример #3
0
    // Start is called before the first frame update
    void Start()
    {
        if (DetailedStatsWindow == null)
        {
            DetailedStatsWindow = transform.Find("Detailed Stats Window").gameObject;
        }
        DetailedStatsWindow.SetActive(false);

        if (DialogWindow == null)
        {
            DialogWindow = transform.Find("Dialog Window").gameObject;
        }
        DialogWindow.SetActive(false);

        controller = TurnController.GetInstance();

        events = EventController.GetInstance();
        events.CharacterSelected += ShowDetailedCharacter;
        events.NotifyStatsChaned += UpdateDetailesWindow;

        mainCamera = Camera.main;
    }
Пример #4
0
 // Start is called before the first frame update
 void Start()
 {
     controller = TurnController.GetInstance();
     mainCamera = Camera.main;
 }