public void SetSpawnProperty(SpawnProperty property)
 {
     spawnMinTimeLeft  = property.LeftSpawnTimeMin;
     spawnMaxTimeLeft  = property.LeftSpawnTimeMax;
     spawnMinTimeRight = property.RightSpawnTimeMin;
     spawnMaxTimeRight = property.RightSpawnTimeMax;
     attackTime        = property.IdleTime;
 }
Пример #2
0
    public void setup(Cover _cover, SpawnProperty _spawnProperty, GameManager _gm)
    {
        gm            = _gm;
        spawnProperty = _spawnProperty;

        useGameObject = true;        //_useGameObject;

        setCover(_cover);
    }
Пример #3
0
        public Spawn(Point p, float rot, float scale, int i, SpawnType t)
        {
            //if (scale == null) scale = 1;
            propertypanel = new SpawnProperty(this);
            type          = t;
            head          = new VertexMarker();
            head.Colour   = Brushes.Yellow;
            head.setPosition(p);

            source        = new VertexMarker();
            source.Colour = Brushes.Yellow;
            p.Offset(-(int)(scale * arrowLength * Math.Cos(rot) / Geometry.Geometry.scaleFactor), -(int)(scale * arrowLength * Math.Sin(rot) / Geometry.Geometry.scaleFactor));
            source.setPosition(p);
            Name = string.Format("Spawn {0}", i);

            setSelected(false);
        }
Пример #4
0
    public void setFromParent(Tile parent)
    {
        Profiler.BeginSample("setting tile from parent");
        pos           = parent.pos;     //tile pos never changes so it can be a direct reference
        spawnProperty = parent.spawnProperty;

        useGameObject = false;

        cover             = parent.cover;
        isHighlighted     = parent.isHighlighted;
        highlightCol      = parent.highlightCol;
        isVisibleToPlayer = parent.isVisibleToPlayer;
        //Debug.Log ("set from parent on frame " + Time.frameCount);

        ignoreStoredRanges = parent.ignoreStoredRanges;
        visibleRangeDists  = parent.visibleRangeDists;          //this is a pointer so AI tiles should not change this value if the boardstate changes at all (ex: cover is destroyed)

        Profiler.EndSample();
    }
Пример #5
0
    private void CreateEnemy(bool isLeft)
    {
        int           timeline = uiGameScene.ElapsedGameTime;
        SpawnProperty prop     = spawnTable[timeline / 5];

        try
        {
        }
        catch (Exception e)
        {
        }
        GameObject spawnPosition = isLeft ? LeftPosition : RightPosition;

        Debug.Log("적이 스폰됨");
        if (spawnPosition != null)
        {
            Enemy             enemy      = AssetManager.Instance.Character.Retrieve("Zombie") as Enemy;
            EnemyAIController controller = enemy.GetComponent <EnemyAIController>();
            controller.SetSpawnProperty(prop);
            enemy.transform.position = spawnPosition.transform.position;
            controller.Spawn(isLeft);
        }
    }
Пример #6
0
 public Tile(Cover _cover, SpawnProperty _spawnProperty, GameManager _gm)
 {
     setup(_cover, _spawnProperty, _gm);
 }