private IEnumerator PlaceProps(GameObject propPanel, int portalIndex, int stopIndex)
    {
        //在前方3格放置传送门
        place = Utility.GetScriptInChild <PlacePropOnCell>(propPanel, "PortalButton");
        GameObject targetCell = manager.cellDic[portalIndex];

        place.StartPlaceProp(targetCell, portal);

        yield return(new WaitForSeconds(0.5f));

        //在前方1格放置停止移动
        place      = Utility.GetScriptInChild <PlacePropOnCell>(propPanel, "StopMoveButton");
        targetCell = manager.cellDic[stopIndex];
        place.StartPlaceProp(targetCell, stopMove);
    }
示例#2
0
    public override TaskStatus OnUpdate()
    {
        GameObject propPanel = player.player_PropPanel;

        place = Utility.GetScriptInChild <PlacePropOnCell>(propPanel, "StopMoveButton");

        if (placeIndex <= 0)
        {
            return(TaskStatus.Failure);
        }

        GameObject targetCell = manager.cellDic[placeIndex];

        place.StartPlaceProp(targetCell, prop);
        return(TaskStatus.Success);
    }