Пример #1
0
    public EnemyFrame Init(EnemyDatabase.BulletFrameInfo f)
    {
        icon = GetComponent <Image>();
        SetFrame(f);

        return(this);
    }
Пример #2
0
    public void DeleteShotPoint()
    {
        DeleteAllLineMarker();

        if (currPoint == null)
        {
            return;
        }

        int count = frames.Count;

        for (int i = 0; i < count; ++i)
        {
            EnemyDatabase.BulletFrameInfo info = currInfo.bullet[i];
            if (info.bulletInfo.Count != 0)
            {
                //int count = info.bulletInfo.Count;
                for (int j = 0; j < info.bulletInfo.Count;)
                {
                    if (info.bulletInfo[j].shotPoint == currShotPoint)
                    {
                        info.bulletInfo.RemoveAt(j);
                    }
                    else if (info.bulletInfo[j].shotPoint > currShotPoint)
                    {
                        info.bulletInfo[j].shotPoint--;
                        ++j;
                    }
                    else
                    {
                        ++j;
                    }
                }
            }
        }

        FirePointMarker save = currPoint;

        currInfo.shotPoint.RemoveAt(currShotPoint);
        markers.RemoveAt(currShotPoint);

        for (int i = 0; i < markers.Count; ++i)
        {
            if (markers[i].code != i)
            {
                markers[i].code = i;
            }
        }
        save.Delete();

        if (currFrame != null)
        {
            CreateLineMarker();
        }

        FrameColorUpdate();
    }
Пример #3
0
    public void SetFrame(EnemyDatabase.BulletFrameInfo f)
    {
        frame = f;

        SetColor();
    }