예제 #1
0
파일: Unit.cs 프로젝트: pogin503/TOL_SRPG
        // 対象のグループと比較して、適切かどうかを返す
        static public bool IsCheckGroup(UnitManagerStatus my, UnitManagerStatus target, string group_type)
        {
            if (target == null)
            {
                return(false);
            }

            switch (group_type)
            {
            case "自身":
                if (my == target)
                {
                    return(true);
                }
                return(false);

            case "味方":
                if (my.group == target.group)
                {
                    return(true);
                }
                return(false);

            case "敵":
                if (my.group != target.group)
                {
                    return(true);
                }
                return(false);
            }

            return(false);
        }
예제 #2
0
파일: Unit.cs 프로젝트: pogin503/TOL_SRPG
        public void Join(Unit unit, string group)
        {
            var u = new UnitManagerStatus();

            u.unit  = unit;
            u.group = group;
            units.Add(u);
        }