コード例 #1
0
    public override bool Interactable(GameObject other)
    {
        if (!IsActivated())
        {
            return(false);
        }

        var blockComponent = other.gameObject.GetComponent <Block>();

        return(blockComponent &&
               blockComponent.IsLot() &&
               blockComponent.IsVacant() &&
               blockComponent.IsInteractable() &&
               CityDocks.Get().CanBuildADock() &&
               GetCandidate(other) != null);
    }
コード例 #2
0
 private void Awake()
 {
     _instance = this;
 }
コード例 #3
0
 private bool CanConstructDocks()
 {
     return(CityDocks.Get().CanBuildADock());
 }