Пример #1
0
    /// <summary>
    /// エンカウント発火
    /// </summary>
    /// <returns>イベントの実行ができたらtrue</returns>
    /// <param name="aEncountKey">エンカウントKey</param>
    public bool encount(string aEncountKey)
    {
        MapEventEncount tEncount  = new MapEventEncount(mWorld.mMapName, aEncountKey);
        MapEventRoot    tRoot     = new MapEventRoot(new List <string>(), true, false, tEncount);
        Operator        tOperator = new Operator(this, tRoot);

        tOperator.mInvoker = mWorld.getPlayer();

        return(addOperator(tOperator));
    }
Пример #2
0
    /// <summary>マップ移動</summary>
    public void moveMap(MapEventMoveMap aMoveEvent)
    {
        //マップ再生成
        load(aMoveEvent.mMapPath);
        aMoveEvent.mEndSide.mEntranceData = mWorld.mFileData.mEntrances[aMoveEvent.mEndSide.mEntrance];
        //移動先座標計算
        MapCharacter tCharacter = MapWorldFactory.createCharacter(mPlayerData);

        aMoveEvent.mEndSide.calculatePositionFromPercentagePosition(tCharacter.mEntityPhysicsBehaviour.mAttriubteCollider);
        tCharacter.delete();
        //プレイヤー追加
        mPlayerData.mPosition  = aMoveEvent.mEndSide.mPosition;
        mPlayerData.mDirection = aMoveEvent.mPlayerDirection;
        MapWorldFactory.addCharacter(mPlayerData, mWorld);
        //マップ移動後イベント実行
        mWorld.mEventSystem.addMoveMapEventEndSide(aMoveEvent.mEndSide, mWorld.getPlayer());
        mWorld.updateWorld();
    }