Exemple #1
0
    private void Awake()
    {
        if (!Instance)
        {
            Instance = this;
            // DontDestroyOnLoad (this);
        }
        else
        {
            Destroy(this);
        }

        mainCamera      = Camera.main;
        Raycaster       = mainCamera.GetComponent <Physics2DRaycaster> ();
        spells          = FindObjectOfType <Spells> ();
        field           = FindObjectOfType <Field> ();
        buildingManager = FindObjectOfType <BuildingManager> ();
        attackManager   = FindObjectOfType <AttackManager> ();
        castManager     = FindObjectOfType <CastManager> ();
        enemyController = FindObjectOfType <EnemyController> ();
        touchController = FindObjectOfType <TouchController>();
        wizard          = FindObjectOfType <Wizard> ();
        xpPoints        = wizard.GetComponent <XPpoints> ();
        GameController  = FindObjectOfType <GameController> ();
        uIManager       = FindObjectOfType <UIManager> ();
        firePoints      = FindObjectOfType <FirePoints> ();
    }
Exemple #2
0
 public override void Start()
 {
     base.Start();
     firePoints = ObjectsHolder.Instance.firePoints;
     isAI       = false;
     AddTower();
     CellPosition = -1;
 }
Exemple #3
0
 public ShipDriver(ShipTeam team)
 {
     bFire         = false;
     bRotate       = false;
     moveDirection = Quaternion.identity;
     enemiesAround = new List <ShipController>();
     friendsAround = new List <ShipController>();
     shipsAround   = new FriendEnemyList(team, friendsAround, enemiesAround);
     this.shipTeam = team;
     firePoints    = new FirePoints(max_fire_points, this);
 }
Exemple #4
0
 public Point(FirePoints points, int index)
 {
     this.points = points;
     this.index  = index;
 }