示例#1
0
        public static UnitOrder GenerateGetItemOrder(Vector3 basePosition, UnitBaseBehaviourComponent unit, InteractingComponent interactWith)
        {
            UnitOrder tmp = new UnitOrder();

            tmp.commandName = Commands.GATHER_ITEMS;
            tmp.p.AddParameter <Vector3>("NextPos", NavMeshPositionGenerator.GetInstance.GenerateCandidatePosition(basePosition, 0.75f, unit, false));
            tmp.p.AddParameter <InteractingComponent>("InteractWith", interactWith);
            return(tmp);
        }
示例#2
0
        public static UnitOrder GenerateMoveOrder(Vector3 basePosition, UnitBaseBehaviourComponent unit)
        {
            UnitOrder tmp = new UnitOrder();

            tmp.commandName = Commands.MOVE_TOWARDS;
            tmp.p.AddParameter <Vector3>("NextPos", NavMeshPositionGenerator.GetInstance.GenerateCandidatePosition(basePosition, 0.75f, unit, false));

            return(tmp);
        }