Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: inherit TVActor Class  (Read 343 times)
naruto
Community Member
*
Posts: 45


« on: December 10, 2011, 04:23:14 AM »

i made a class and inherit TVActor class
public class cUnit : TVActor
{
}

but when i need to declare an actor in any other class it does not work
public class LoadUnit
{
cUnit actor = new cUnit();
actor.LoadTVA(datasource);
}

doesnot work because i need to write
actor = scene.CreateActor("")
and when i wrote the line above .... it says that can not convert type MTV3D.TVActor to cUnit

any idea ... Huh
Logged
ZaPPZion
Moderator
Community Member
*****
Posts: 555


« Reply #1 on: December 10, 2011, 06:18:10 AM »

Yea, TV was not build with the idea of being inheritable, so there's practically no way to inherit from these classes. Of course you could work around it by making a new class have an instance of the TVActor and having all its methods passed through to that one, but that'll probably be some work and might cost you some speed Smiley
Logged

Check out my website: www.bartkuipers.com
naruto
Community Member
*
Posts: 45


« Reply #2 on: December 10, 2011, 06:28:12 AM »

yea i thinks the problem in 6.5
because in 6.2 i can use it without write
actor = scene.CreateActor("")
just i write 
actor.load(datasource)
and everything works ok..

i will try to find another way to make it ...
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks