Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        _bs = this.GetComponentInParent <Bigship> ();

        _turrets = this.GetComponentsInChildren <Turret> ();

        _faction = _bs._faction;

        foreach (Turret turret in _turrets)
        {
            turret._faction = _bs._faction;
        }
    }
Ejemplo n.º 2
0
    public void Init(BattleCenter bc, Bigship owner = null)
    {
        _aiController.CenterOfBattle = bc;

        _living = true;

        if (owner != null)
        {
            _owner   = owner;
            _faction = owner._faction;
        }
        else
        {
            _faction = Faction.ALLY;
        }
    }
Ejemplo n.º 3
0
    public virtual void Initialize(BattleCenter battleCenter, Bigship _owner)
    {
        targetNavWaypoint = new List <GameObject> ();
        possibleTargets   = new List <Killable> ();
        target            = null;
        targetTransform   = null;
        // for demo only - i've varied the sensitivity and speed so that they react/behave differently
        // in a game situation, where you want to target the other enemies, you'll have to
        // set the speed to the same as the player to make it work, unless you provide the player
        // with controls to change speed.
        actualSensitivity   = Random.Range(actualSensitivity - .2f, actualSensitivity + .2f);
        originalSensitivity = actualSensitivity;

        speed = Random.Range(speed - 5f, speed + 5f);

        targetLight.enabled = false;

        this.battleCenter = battleCenter;

        this._owner = _owner;

        CreateField();
    }