Beispiel #1
0
    public void SetBombVertical()
    {
        entityData.basicBombType = BasicBombType.Vertical;
        entityData.specialType   = SpecialType.None;
        if (entityData.randomType != RandomType.Type)
        {
            entityData.randomType = RandomType.None;
        }
        entityData.ComposeId();
        Sprite sp = PoolingManager.GetEntitySprite(entityData.key);

        if (sp != null)
        {
            SetEntitySprite(sp);
        }
    }
Beispiel #2
0
    public void SetBombMissile()
    {
        entityData.extraBombType = ExtraBombType.Missile;
        entityData.specialType   = SpecialType.None;
        if (entityData.randomType != RandomType.Type)
        {
            entityData.randomType = RandomType.None;
        }
        entityData.ComposeId();
        Sprite sp = PoolingManager.GetEntitySprite(entityData.key);

        if (sp != null)
        {
            SetEntitySprite(sp);
        }
    }
Beispiel #3
0
    public void SetBombBox()
    {
        entityData.basicBombType = BasicBombType.Box;
        entityData.specialType   = SpecialType.None;

        // Initialize if the current randomtype is not the Type.
        // If the entity has RandomType.Type, it will be a box type bomb of random entity.
        if (entityData.randomType != RandomType.Type)
        {
            entityData.randomType = RandomType.None;
        }
        entityData.ComposeId();
        Sprite sp = PoolingManager.GetEntitySprite(entityData.key);

        if (sp != null)
        {
            SetEntitySprite(sp);
        }
    }
Beispiel #4
0
    public void AssignEntitiesRandomly()
    {
        if (editingLevel != null && usedEntityIndexes != null)
        {
            EditorEntity ent;
            UInt16       typeNum;

            for (int i = 0; i < board.Count; i++)
            {
                if (board[i].squareData.disused == false && board[i].squareData.squareType != SquareType.SpreadMachine && board[i].editingEntity == null)
                {
                    typeNum = usedEntityIndexes[UnityEngine.Random.Range(0, usedEntityIndexes.Count)];
                    ent     = EditorMenuManager.instance.CreateEntityForEditing("ent_" + board[i].squareData.row + "_" + board[i].squareData.col, board[i].gameObject.transform);
                    ent.entityData.typeNumber = typeNum;
                    ent.entityData.ComposeId();

                    ent.SetEntitySprite(PoolingManager.GetEntitySprite(ent.entityData.key));
                    editingLevel.SetEntity(board[i].squareData.row, board[i].squareData.col, ent.entityData.id);
                    board[i].editingEntity = ent;
                }
            }
        }
    }