예제 #1
0
    public virtual void load(
        string code,
        string type,
        float speed,
        float attack,
        float scale)
    {
        // Load by character code

        GameAIDirectorData itemData = new GameAIDirectorData();

        itemData.code   = code;
        itemData.type   = type;
        itemData.speed  = speed;
        itemData.attack = attack;
        itemData.scale  = scale;

        GameAIController.LoadCharacter(itemData);
    }
예제 #2
0
    public virtual void load(string code)
    {
        // Load by character code

        float speed  = .3f;
        float attack = .3f;
        float scale  = 1f;

        speed  = UnityEngine.Random.Range(.8f, 1.6f);
        attack = UnityEngine.Random.Range(.3f, .4f);
        scale  = UnityEngine.Random.Range(.8f, 1.6f);

        GameAIDirectorData itemData = new GameAIDirectorData();

        itemData.code   = code;
        itemData.type   = GameActorType.enemy;
        itemData.speed  = speed;
        itemData.attack = attack;
        itemData.scale  = scale;

        GameAIController.LoadCharacter(itemData);
    }
예제 #3
0
 public virtual void loadCharacter(GameAIDirectorData actor)
 {
     GameAIController.BroadcastCharacterMessage(actor);
 }
예제 #4
0
    // MESSAGING

    public virtual void broadcastCharacterMessage(GameAIDirectorData actor)
    {
        Messenger <GameAIDirectorData> .Broadcast(GameAIDirectorMessages.gameAIDirectorSpawnActor, actor);
    }