Exemplo n.º 1
0
        /// *******************************************************
        /// <summary>コンストラクタ</summary>
        /// *******************************************************
        public MoveScript(EnemyScriptMain mng, ScriptGroup group, string key, float wait = -1)
        {
            Manager = mng;
            Scripts = group;

            if (string.IsNullOrEmpty(key) == false)
            {
                Scripts.ActivateLine(line => {
                    CommandAttribute atr = line.GetAttribute("key");
                    if (atr == null)
                    {
                        return(true);
                    }
                    return(atr.CompareStrValue(key));
                });
            }

            Limit     = LIMIT_TYPE.TIME;
            PastTime  = 0;
            WaitTime  = Mathf.RoundToInt(wait);
            LineIndex = -1;

            Shots       = new List <ShotScript>();
            RemoveShots = new List <ShotScript>();
        }
Exemplo n.º 2
0
        /// *******************************************************
        /// <summary>コンストラクタ</summary>
        /// *******************************************************
        public SpawnScript(EnemyScriptMain mng, ScriptGroup group, string keyword = null)
        {
            Manager = mng;
            Scripts = group;

            FindRunScript("common");
            if (string.IsNullOrEmpty(keyword))
            {
                keyword = "default";
            }
            FindRunScript(keyword);
        }