Exemple #1
0
    public void OnDeleteSuppression(AgentModel actor)
    {
        SuppressAction suppressAction = null;

        foreach (SuppressAction ta in this.agentList)
        {
            if (actor == ta.model)
            {
                suppressAction = ta;
                break;
            }
        }

        if (suppressAction == null)
        {
            print("Error to founding agent");
            return;
        }

        if (suppressAction.GetControllable() == false)
        {
            print("this agent cannot controllable");
            return;
        }

        this.suppressingAgentList.Remove(suppressAction);
    }
Exemple #2
0
    //이거
    public void OnSetSuppression(AgentModel actor)
    {
        SuppressAction suppressAction = null;

        foreach (SuppressAction ta in this.agentList)
        {
            if (actor == ta.model)
            {
                suppressAction = ta;
                break;
            }
        }

        if (suppressAction == null)
        {
            print("Error to founding agent");
            return;
        }

        if (suppressAction.GetControllable() == false)
        {
            print("this agent cannot controllable");
            return;
        }

        this.suppressingAgentList.Add(suppressAction);


        /*
         * if (target is AgentModel)
         * {
         *  this.suppressingAgentList.Add(suppressAction);
         *
         *  actor.StartSuppressAgent((AgentModel)target, suppressAction, SuppressType.UNCONTROLLABLE);
         * }
         * else if (target is OfficerModel) {
         *  actor.StartSuppressAgent((OfficerModel)target, suppressAction, SuppressType.UNCONTROLLABLE);
         * }
         * else if (target is CreatureModel) {
         *  actor.SuppressCreature((CreatureModel)target, suppressAction);
         * }
         * SuppressAction sa = new SuppressAction (actor);
         * sa.weapon = SuppressAction.Weapon.GUN;
         * AutoCommandManager.instance.SetSuppressAgent(target, sa);
         */
    }