Beispiel #1
0
 void OnRightClick()
 {
     if (_entity.isDiscovered)
     {
         CommandMapper.UpdateTarget(_entity);
     }
 }
Beispiel #2
0
    void ProcessPrimaryKey()
    {
        Vector3    p  = GetClickedPosition();
        GameObject g  = GetClickedObject();
        ShipEntity se = GetClickedShip(g);

        //if we leftclicked on a ship
        if (se != null)
        {
            //if its player-owned
            if (se.teamID == 0)
            {
                CommandMapper.SelectShip(se, _shiftModifier, _controlModifier);
            }
            else
            {
                CommandMapper.UpdateTarget(se);
            }
        }
        else
        {
            CommandMapper.AddMove(p, !_shiftModifier);
        }
    }